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
(2,761 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!

 

Daniel E.
TestStand Staff Product Support Engineer
National Instruments
CTA/CLD
Message 2 of 3
(2,748 Views)

Thanks Daniel for the help.

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