NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get step fields using substeps and LabVIEW

In my testand application I created my own step type. This step type has several containers (see picture1).
Using LabVIEW I would like to launch a VI as a substep pointing on the step and listing the containers ( and controls inside thesecontainers) using an ActivX pointer on the Testand API.
This basically works : This Context reference is passed to my VI as a sequence context and I can then have a refrence on my step and have its properties (see picture2)... But I can't find a way to list its containers (Params in my app).
Can somebody help me ?
CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
Download All
0 Kudos
Message 1 of 2
(3,032 Views)
Do you want to find a way to determine what is in the Params container?  If so, you need to get the Params object.  You can do this similarly to what you are already doing, but instead of calling the Name property, you need to call the GetPropertyObject method with the lookup string of "Params", and 0 for options.

After you do this, you can iterate through this object to determine what is inside of it.  You will have to loop and use recursion to get all the subproperties of each level.  The methods you will need are:
GetNumSubProperties, which will tell you how many children a Property Object has.  You will then need to get the subproperty by calling "GetNthSubProperty".  If you want to get the values, you will have to call either GetValNumber or GetValString (or GetvalBoolean, etc...).  You need to determine what type each subproperty is to determine if you should dig deeper or call a method . To do this, you will need to call the GetType method, which will tell you if its a container, number, string, Boolean, etc...

Allen P.
NI
Message 2 of 2
(2,976 Views)