01-04-2006 04:09 AM
01-05-2006 01:28 AM
Hi,
Get a PropertyObject reference of the StationGlobals by calling SequenceContext.StationGlobals() method.
Then use PropertyObject.GetNumSubProperties("") to return the number of items in the StationGlobals.
Then you can use PropertyObject.GetNthSubPropertyName("", index, 0) within a loop to obtain the Name of each item in the StationGlobals. "Index in a non-zero value".
Use the TestStand Programmer Help for more details.
Hope this helps.
Regards
Ray Farmer
01-09-2006 06:29 AM
Hi Ray,
thank you very much. I'll try that!
Cheers
Oli
11-17-2006 04:39 AM
Hi
I want to do that too, but what you have written, does not work. I attached a screenshot, where I expect NrOfElements to be 45 (I have 45 StationGlobals)
What do I do wrong?
11-17-2006 08:39 AM
Hi,
What you return is the number of sub properties in the StationGlobals, i.e with the default StationGlobals there is one container called TS therefore the method returns 1.
If you are looking for the number of elements in an array, then first you have to find that property in the StationGlobals then you can find the size of the array.
If you know the name of the Property then use GetPropertyObject() with the lookup string set to the number of the property.
Using this reference you can then use GetDimensions to get the size of the array (multi dimensional) or if you know its a 1D array then use GetNumElements.
Hope this helps
Regards
Ray Farmer