SetLabTalkVectorValue
Assigns an Origin C vector to a LabTalk Object's vector type property.
BOOL SetLabTalkVectorValue( LPCTSTR lpcszLabTalkVector )
Returns TRUE on success or FALSE on failure.
EX1
void vectorbase_SetLabTalkVectorValue_ex1() { // Get current values of the LabTalk vector FDlog.Type and list them vector<string> vecSave; BOOL bSave = vecSave.GetLabTalkVectorValue("Fdlog.Type"); if(bSave) { printf("Current contents of FDlog.Type:\n"); for( int ii = 0; ii < vecSave.GetSize(); ii++ ) printf(" %s\n", vecSave[ii]); // Change the contents of the LabTalk vector FDlog.Type vector<string> vecNew = {"*.OPJ", "*.TXT"} // Set new values to the LabTalk vector and check by reading back BOOL bSet = vecNew.SetLabTalkVectorValue("Fdlog.Type"); if( bSet ) { // Output contents of Fdlog.Type using LabTalk printf("New contents of Fdlog.Type:\n"); for( int ii = 0; ii < vecNew.GetSize(); ii++ ) { string str = LabTalk.FDlog.Type$(ii+1)$; printf(" FDLog Type (%d) : %s\n", ii, str); } // Now set Fdlog.Type back to original values BOOL bReset = vecSave.SetLabTalkVectorValue("Fdlog.Type"); if( bReset ) out_str("FdLog.Type contents set back to original values"); else out_str("Failed to restore Fdlog.Type back to original values"); } else out_str("Failed to set LabTalk vector Fdlog.type"); } else out_str("Failed to read LabTalk vector Fdlog.Type"); }
Set a LabTalk vector using contents of this vector.
vectorbase::GetLabTalkVectorValue
origin.h