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: 

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

Solved!
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
(906 Views)
Solution
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.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 5
(857 Views)

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
(832 Views)

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
(828 Views)

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
(825 Views)