NI TestStand

Showing results for 
Search instead for 
Did you mean: 

How can I 'programmatically' access value of an output from code module.

Go to solution

Hello All,


I'm wondering if there is a property available such that I can access the value of an output from a code module (without assigning/saving it to a variable).

Say, output from a code module will be an input to another code module.


Hoping for something similar to "".

May be starting with "RunState.Sequence.Main["Pass/Fail Test"]........"

0 Kudos
Message 1 of 5
Accepted by topic author scofield

You HAVE to assign it to something to access it.  Otherwise you are just accessing nothing.  So basically you have code module A and code module B and you want to take an output from A to B.  You still have to assign the output of A to something.  You can't just leave it blank.


Even if you assign it to a step property it needs to be assigned.

~Will work for kudos and/or BBQ~
Message 2 of 5

Hello jigg,


Thank you for taking out time and replying to my query.

I was thinking if inputs/outputs from a code module are being collected automatically and I could access it without assigning to any variable. Guess its not the case.


Thanks again.

0 Kudos
Message 3 of 5

For completeness, I should mention that if you click the log checkbox for a parameter or return value, it will be stored in the results.  I did this for a return value of a dll call and it was stored at:


Locals.ResultList[<index of result for step in question>].AdditionalResults["Parameters"]["Return Value [Out]"]


I got that path by break pointing after the step and inspecting Locals.ResultList in the variables view.

0 Kudos
Message 4 of 5

Hi James,


Thanks for sharing info. Although, in my requirement, I actually don't want some of these outputs (from code module) to be logged. Just want to access it for some calculations (in subsequent steps).


Thank again.

0 Kudos
Message 5 of 5