NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change NI_FlowControl properties on a step using the API

Hi,

 

Using CVI and the TS API, I'm trying to create flow control steps like if/for/while etc. The following lines do the step creation but I'd like to change the expressions for each.

 

For instance, NI_Flow_If has "ConditionalExpr" that is an expression but the combination of API calls required to place a string in that expression, I just can't find. Anyone tried this before??  This is CVI, not LabView.

 

       // Create a Statement step as a new instance of the step type "Fort"
    errChk( TS_EngineNewStep (engineObj, &errorInfo, "", "NI_Flow_For", stepObj));
        // Name it
    errChk( TS_StepSetProperty (*stepObj, &errorInfo, TS_StepName, CAVT_CSTRING, nameText ));

To change the expression in a "Statement" Step type you would change, TS_StepPostExpression using TS_StepSetProperty. But the enumerated list of step properties in tsapicvi does not point to a conditional expression. Any help is appreciated.

 

Thanks

0 Kudos
Message 1 of 2
(3,046 Views)

found it.

 

Look under the variables tab in the UI, you can explicitly set each of the "Step" parameters using TS_StepSetProperty.

0 Kudos
Message 2 of 2
(3,022 Views)