NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

List of Data Types loaded in TestStand using APIs

Solved!
Go to solution

Hi All,

 

I wanted to get the list of all data types that are loaded in TestStand. With the Engine.GetTypeNames, I am able to get a list of type definitions present in TestStand, I wanted to split this into Step Types and Data Types. 

 

I am currently getting the Type definition object using the name and trying to typecast it to Step Type. If there is an error in typecasting, I am considering it as a Data Type. Please let me know if this is the right approach or are there any other approach to find this. 

TS Data Types.png

Also let me know how to typecast the "TypeDefinition" object to a "DataType" object (similar to the TS.StepType" in the above case). I am not able to find the appropriate Active X object in the "NI TestStand 2016 API Version 1.0" class. Should I refer to any other class?

 

Thanks,

Sree Ranjani

 



Message 1 of 2
(2,027 Views)
Solution
Accepted by SreeRanjaniSG

RunState.Engine.GetTypeDefinition("Step Type Name").Type.DisplayString  will show the type name.  Steps will have "Step Type, description"  So you can parse what is before the comma and see if it is Step Type.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 2
(2,005 Views)