LT_get_str
Layer-LT_get_str
Get LabTalk string with a specific layer as the active layer.
BOOL LT_get_str( LPCSTR lpcszLabTalkString, char * pBuffer, int nBufferSize )
Return TRUE if success, return FALSE if string variable is not correctly specified or string is too long.
EX1
//Output the worksheet's name. void Layer_LT_get_str_ex1() { char szBuffer[200]; Worksheet wks; wks.Create("Origin"); //Get the layer's name. wks.LT_get_str("layer.name$", szBuffer, 200); out_str(szBuffer); }
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.
The Layer Object is only temporarily set as the active layer. The Layer that was active before the code executes is restored as active upon return.
Layer-LT_set_str
origin.h