04-22-2009 07:41 AM
Hello!
We are doing to tool in Labview which analyses our defined custom step types. For this, we want to query the step type object from the TestStand engine.
Unfortunatly, the IEngine.GetTypeDefinition() method returns a property object. There is an old entry in the forums with the same problem. There was stated just to typecast the object, but it was an VB example. How can this type cast be done in LabView? Using the "To More specific class" node results in broken fires because this polymorphic vi does not support the data type TS.PropertyObject or TS.StepType. So how to aquire a reference to TS.StepType from the return value of IEngine.GetTypeDefinition()?
Best regards,
Helge
04-23-2009 07:10 AM - edited 04-23-2009 07:13 AM
Hi, you need to go to the connectivity palette and then to the activex palette. On there is a "to datatype". The top terminal requires the data type you want to convert to - you can use a reference constant and then point it at the appropriate type (right click it and go to select activex class). Here's snippet to work from
Hope that helps
Thanks
Sacha Emery
Systems Engineer (NIUK)
04-23-2009 08:03 AM
12-21-2009 08:34 PM
12-21-2009 09:13 PM
OK - I just figured it out! Use the AsPropertyObject method. ie. Using the ActiveX adapter, set Object Class to StepType, and Call Method AsPropertyObject. The object reference passed out will be of type StepType. Then pass this StepType into the next ActiveX step. ie ObjectClass: Step, CallMethod ChangeStepType..