NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get locals and globals using API

Solved!
Go to solution

Hi, I am making in LV an editor for TS. User should be able to change the value of file globals and locals variables. Using TS API, is possible to get all the file globals and locals variables without knowing the name that those variable have in TS? I mean, if I knew the name I could use the Get Property Value with the lookup string. But if the I do not know the name of the variable, can I get the list (and their values) of the variable?

 

Thanks a lot.  

0 Kudos
Message 1 of 5
(3,707 Views)
Solution
Accepted by topic author logatto

Try the following link

 

http://forums.ni.com/ni/board/message?board.id=330&message.id=3390&query.id=6624776#M3390

 

In summary:

Use GetNumSubProperties method to get the total number of Locals / FileGlobals.

Use GetNthSubProperty to get the sub properties using the an index starting at 0 to GetNumSubProperties-1

Use the Name property to obtain the Name of the subproperty.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 5
(3,700 Views)

Hi,

 

These links maybe more useful

http://digital.ni.com/public.nsf/allkb/5C08014017AA895686256DD6008323FB

the following as examples

http://sine.ni.com/devzone/cda/epd/p/id/3086

 

regards

Ray Farmer

 

 

Regards
Ray Farmer
0 Kudos
Message 3 of 5
(3,692 Views)

We have a tool where I work, where we create a MSWord document based on the sequence file.  The tool reads all the locals, parameters, and File Globals names and values and populates the document.   Here is an attached VI to read the names ( comments and variable type ) of the all the locals.  It may be a good starting point...

 

Thanks,

 

PH

0 Kudos
Message 4 of 5
(3,686 Views)

Thanks all guys.

 

All very useful.

0 Kudos
Message 5 of 5
(3,675 Views)