What is the best way to get many (100) fields from a python obj into teststand.
We're comming from C#, where it's possible to generate a data-type in TestStand based on the data-type in C# (at least on C# structs).
That means if we have a C# struct with hundred of fields, TestStand can create a similar custom data type with the correct field names, by a right click.
How do I access field values in a Python object passed back into Teststand ?
we are using TestStand 2014.
Is it an advantage to use TestStand 2019 in this respect ?
Solved! Go to Solution.
In Python, if you have an object (assume a python class instance) stored in a variable of type object reference, you can use python adapter to call function or get/set attributes (equivalent of properties in C#) in the class instance.
Similar to how a C# struct is mapped to a container in TestStand, tuple in Python is mapped to container. So, you can return a tuple and you can store its data in a container. Python adapter does not have the ability to detect the contents of the parameter or return value at edit time. Hence, in Python adapter, you do not get a single click option to create custom data type. You need to create the container along with its subproperties and then use it in the return value to store the contents of tuple.