From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

api call to verify an expression

Is there any api call to verify (validate) an expression that I can use in CVI? Similar to the check button on the left side of the textbox when entering an expression.
 
Thanks for the help.
--Aaron.
0 Kudos
Message 1 of 4
(3,148 Views)

Engine.CheckExpression and Engine.CheckExprSyntax

(in CVI TS_EngineCheckExpression and TS_EngineCheckExprSyntax).

 

Allen P.

NI

 

 

Message 2 of 4
(3,141 Views)

Aaron,

You can use either:
Engine.CheckExpression
or
Expression.Validate
In CVI you will use the Engine method as follows:

int __declspec(dllexport) __stdcall MyEntryPoint (CAObjHandle context)
{

CAObjHandle                 tsEngine = 0;
char* expression =0;
char * errDesc =0;
long startPos;
long endPos;
VBOOL isValid = VFALSE;
TS_SeqContextGetEngine(context, &errorInfo, &tsEngine);
TS_EngineCheckExpression (tsEngine, &errorInfo, context, expression, &errDesc, &startPos,&endPos, &isValid);
CA_DiscardObjHandle(tsEngine);
CA_FreeMemory(errDesc);
}

Check the TestStand API online help for more information.
Hope it helps.

Antonio.

Message Edited by Antonio Lie (NI) on 10-25-2005 04:28 PM

Message 3 of 4
(3,139 Views)

Thanks a lot guys!

--Aaron.

0 Kudos
Message 4 of 4
(3,135 Views)