10-02-2006 04:17 AM
10-02-2006 07:28 AM
Hi Yazid,
Using your Container as the reference to the method PropertyObject.GetNumSubProperties("") this will return the number of subproperties within your container.
You can then use this as the maximum loop count.
You can then get the Name of the subProperty using Locals.subPropertyName = PropertyObject.GetNthSubPropertyName("", Locals.index, 0) this will return a string.
You can use this to obtain the type using PropertyObject.GetType(Locals.subPropertyName, 0, Locals.isObject, Locals.isArray, Locals.typeName) this returns the type of the subproprety eg (boolean, Number, String etc)
You can then decide which of the GetVal methods to use. eg if a sub-property is a string but not an array then you could use
Locals.subPropertyObjRef = PropertyObject.GetPropertyObject("Locals.subPropertyName, 0)
Locals.stringValue = PropertyObject.GetValString("", 0)
You can find information of the PropertyObject Methods in the TestStand Programmer Help.
Hope this gets you started.
Regards
Ray Farmer
10-02-2006 08:40 AM
02-02-2015 03:55 AM - edited 02-02-2015 03:58 AM
Hi,
This way have been used in my TestSystem using TestStand 4.2.1 and works fine but now I'm migrating to 2013 and this "PropertyObject.GetType(Locals.subPropertyName, 0, Locals.isObject, Locals.isArray, Locals.typeName)" is obsolete and the sequence is not working. I have tryed to use different ways off getting the type but haven't been successful.
Some one have a way to do this?
Regards Lars
11-13-2017 01:59 AM
You need to obtain a PropertyObjectType which is done by PropertyObject.Type
Now you can get the value of the type by PropertyObjectType.ValueType
Hence for your Step 'get type' use
Locals.Type=Parameters.InputContainer.GetNthSubProperty("",Locals.Loop,0).Type.ValueType
When you get the value eg Locals.OutString use Locals.subPropertyObjRef.GetValString("",0)