NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Set a Default CVI Function parameter

Hello,

 

I am wondering if there is a way to set some parameters of  a function as default. For example I am working on a project that will be using TestStand API so everytime I call a function in TestStand I will have to be filling the parameter with "ThisContext" so that I can use TestStand API functions in CVI. I would like to create functions that could auto fill this parameter with the a variable that I know that exist in teststand execution.

 

Thanks for your comments.

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

What about creating a copy of the step type and creating some code templates? You could also just make some step templates that you can drag in and modify.

 

Hope this helps!

Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 3
(2,422 Views)

If you are using the TestStand API you can use the pre-expressions of the step to run:

 

Step.TS.SData.Call.Parms[1].AsCommonCParameter.ValueExpr= Variable1

 

Where Parms[1] is the parameter index in the function prototype and Variable1 is a string.

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