2.2.4.33.11 Page::LT_execute

Description

Execute a LabTalk script by temporarily setting this page as the active page.

Syntax

BOOL	LT_execute(LPCSTR lpcszLabTalkStr, int wCntrl = 0, int* pnErr = NULL, DWORD dwOptions = 0)

Parameters

lpcszLabTalkStr
[input]LabTalk script to execute.
wCntrl
[input]This argument is currently ignored.
pnErr
[output] Error code
dwOptions
[input] 0 or
enum {
LTEXEC_LINE_BY_LINE = 0x00000001,// execute buffer line by line, so no need to add ; termination to end of line
};

Return

Returns TRUE on successful exit and FALSE on failure.

Examples

EX1

int Page_LT_execute_ex1()
{
    // Output the template name for all the graphs in the project.
    foreach(GraphPage gp in Project.GraphPages)
        gp.LT_execute("win -g; type \"%h uses template %a\";");
    return 0;
}

Remark

Execute a LabTalk script temporarily setting the page object as the active page. This command is equivalent to LabTalk's "win -o" command. The original active page is restored after the script completes execution.

See Also

Header to Include

origin.h