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: 

Reading the value of the "WaitForTarget" attribute of the Wait step

Solved!
Go to solution

I am trying to access the  "Step.WaitForTarget" attribute for the Wait step but can't find the correct syntax to use in an expression or the correct API calls to use in an action step.  I intend to use this in an expression as I am looking for a specific value.

 

I have a object reference to the step that I am testing  (Locals.StepRef) and from that I have no issues reading the standard attributes like name, step type, preconditions, etc...

 

How do we access the special additional properties of the wait step ?

0 Kudos
Message 1 of 3
(3,920 Views)
Solution
Accepted by topic author 4watt

Hey 4watt,

 

One easy way to do this is to access the step reference as a PropertyObject and use GetValNumber to obtain the value. For example:

 

Locals.StepRef.AsPropertyObject.GetValNumber("WaitForTarget",0)

 

I tested this out and it does correctly return the value of WaitForTarget. Let us know if you need any more assistance!

 

Message 2 of 3
(3,907 Views)

Thanks Daniel for the help.

0 Kudos
Message 3 of 3
(3,889 Views)