2.2.4.33.12 Page::LT_get_str

Description

Get LabTalk string temporarily setting this page as the active page.

Syntax

BOOL LT_get_str( LPCSTR lpcszLabTalkString, char * pBuffer, int nBufferSize )

Parameters

lpcszLabTalkString
[input] LabTalk global string, or any other LabTalk string expression
pBuffer
[output] character buffer to receive the string
nBufferSize
[input] size of the buffer including the terminating zero

Return

Return TRUE if success, return FALSE if string variable is not correctly specified or string is too long.

Examples

EX1

void    Page_LT_get_str_ex1()
{
    char    szBuffer[200];
    WorksheetPage wksPage("Book1");	
    //output the name of the active layer.
	wksPage.LT_get_str("page.active$", szBuffer, 200);
	out_str(szBuffer);    
}

Remark

lstrcpyn is used inside Origin to copy LabTalk string into the buffer supplied, so that if the buffer is too small, the result string will have one less character than specified to leave room for the terminating character.

See Also

Page::LT_set_str

Header to Include

origin.h

Reference