NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand 2016 Determine FileGlobal Type Programmically

Solved!
Go to solution

I have my FileGlobals test parameters stored in a 3rd party software package as string elements (company thing). When I read the information from this package, I need to determine if the data should be stored in the FileGlobals as an Integer, Float, Boolean, String, etc. so that I can call the correct TestStand API, such as FileGlobals.SetValNumber(...), etc.  I am trying to determine if there is a TestStand API which will allow the specification of the FileGlobals parameter and the function will return the data type similar to the FileGlobals.Get*() whatever APIs.

 

Thank you for any help.

0 Kudos
Message 1 of 3
(2,300 Views)
Solution
Accepted by topic author Bill.Simmons

You could do something like this and then case off the name.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(2,271 Views)
Solution
Accepted by topic author Bill.Simmons

Thank you for your help. You pointed me in the correct direction. After a little trial and error, I found a more direct solution.

 

Locals.FileGlobals_Element_Data_Type = FileGlobals.GetPropertyObject( Locals.FileGlobals_Element_Name, 0 ).Type.DisplayString

 

After I have the DisplayString, I put a precondition, based on the DisplayString, on the steps that convert and set each element from the input string. Now that I understand that method, I will now try to determine if a Number is float, signed, or unsigned, etc.

 

Thank you again !

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