NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Scripting API Create Parameter Pass by reference

Go to solution

Hello everyone,


As part of a teststand sequence generation tool linked to DQMH modules, I am trying in vain to create a sequence parameter with the attribute "Pass by Reference" and not "Pass by value" via the TestStand API in LabVIEW.








Wish without manual intervention:



Thank you in advance for your help.


0 Kudos
Message 1 of 4

Your code is setting the actual value of the parameter.


Choosing between byRef / byVal option for the parameter has to be done upon creation of the parameter. I don't think SetValString is the appropriate way to do so (though I can't tell you which one to use, I have to admit)

0 Kudos
Message 2 of 4
Accepted by topic author TeamJP66

Need to correct myself after checking the documentation! I would've expected to have a "proper/ dedicated" Method for creating parameters, but there isn't


From what I have learned, the switch from byVal to byRef is achieved using a property flag for the parameter




Can you try to do the following: 

ParameterRef.AsPropertyObject.SetFlags("Pass by Reference", 0, 0x4)

Message 3 of 4

Hello Oli_Wachno,


Thank you for your return and your research, indeed it exactly meets the need and works!


I hadn't thought of being able to find this property in the flags 🙂

0 Kudos
Message 4 of 4