If you are using CVI and you call a step that does this it might look something like this:
void __declspec(dllexport) __stdcall AccessLocalVariables(CAObjHandle seqContextCVI, short *errorOccurred,
long *errorCode, char errorMsg[1024])
{
ERRORINFO errorInfo;
int error = 0;
ErrMsg errMsg = {'\0'};
CAObjHandle sequenceFile = 0;
CAObjHandle propertyObjFile = 0;
tsErrChk(TS_SeqContextGetSequenceFile (seqContextCVI, &errorInfo, &sequenceFile));
tsErrChk(TS_SeqFileAsPropertyObject (sequenceFile, &errorInfo, &propertyObjFile));
tsErrChk(TS_PropertyObjectFileIncChangeCount (propertyObjFile, &errorInfo));
Error:
if (propertyObjFile)
CA_DiscardOb
jHandle(propertyObjFile);
if (sequenceFile)
CA_DiscardObjHandle(sequenceFile);
// If an error occurred, set the error flag to cause a run-time error in TestStand.
if (error < 0) {
*errorOccurred = TRUE;
*errorCode = error;
strcpy(errorMsg, errMsg);
}
}
Scott Richardson
https://testeract.com