NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get step properties without lookUp strings ( C# )

Hi
 
I have used TestStand 4.0 for a couple of weeks and the goal is to create a custom standalone tester. One question has arised: How to get custom step custom properties in code without knowing what to look for? Is it possible or does one always has to know that to look for.
 
BR,
Timo M
 


Message Edited by TMalm on 02-26-2008 06:08 AM

Message Edited by TMalm on 02-26-2008 06:16 AM
0 Kudos
Message 1 of 2
(3,020 Views)

If you are trying to iterate through an unknown property structure, then the following PropertyObject methods can be useful:

GetNumSubProperties

GetNthSubPropertyName

GetNthSubProperty

GetType

GetVal<DataType>

GetPropertyObject

For arrays, the following are also handy

GetNumElements and/or GetDimensions

GetVal<DataType>ByOffset

GetPropertyObjectByOffset

Note that even for arrays with multiple dimensions, you can iterate with a single loop thanks to the "ByOffset" methods. You can convert between a linearized offset and multidimensional coordinates with the GetArrayIndex and GetArrayOffset methods.

If you hit a road block, make sure you check all the available methods and properties of PropertyObject.

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