LTVarTempChange

 

Name

LTVarTempChange

Remark

The class makes setting and restoring a LabTalk variable easy. It sets a LabTalk variable to a new value while storing the old value. When the instance of the class goes out of scope, the instance is destroyed and the system variable restored to it's previous value.

Examples

EX1

string strFile = "D:\\data.dat"; // some data file name
ASCIMP  ai;
if(0 == AscImpReadFileStruct(strFile, &ai) )
{
    // In this example we will disable the ASCII import progress
    // bar by setting the LabTalk System Variable @NPO to zero.
    LTVarTempChange progressBar("@NPO", 0); // 0 = disable progress bar

    // Get active worksheet from active work book.
    Worksheet wks = Project.ActiveLayer();

    if(0 == wks.ImportASCII(strFile, ai))
        out_str("Import data successful.");
}

Header to Include

origin.h

Reference

Members

Name Brief Example
LTVarTempChange Default constructor Examples