07-18-2007 12:29 PM
07-19-2007 10:42 AM
Hi Guy,
There are a couple API calls that could help you on this one. Step.IconName returns the path of where the icon is stored for that step. Step.LargeIcon returns the picture for that step.
From the help:
Step.IconName
Returns the icon's filename for the step.
If the step type has no icon file, the property returns the icon filename for the module adapter that the step uses.
Icon files are located in the <TestStand>\Components\NI\Icons and <TestStand>\Components\User\Icons directories.
Step.LargeIcon
Returns the large version of the icon that represents the step.
The step type of the step defines the icon that the property returns. If the step type does not specify an icon, the property returns the icon that the Adapter of the step specifies.
Those are in the help and will be beneficial to you.
For the MessageText you have to use the Step.asPropertyObject then get the MessageExpr property. Also, when you have the step as a property object you can get the comment. Let me know if this is at all helpful and if you need more info on it.
In the TestStand help there is a document titled: Using TestStand API Object. It's a diagram of all the objects in TestStand. You can click on any of the objects to look at the methods and properties exposed by that object. Some of the properties however you have to get by converting that object into a propertyobject.
Regards,
07-19-2007 11:44 AM
07-19-2007 01:19 PM - edited 07-19-2007 01:19 PM
Hey Guy,
Sorry I guess I should have explained a little more. Once you have the step as a property object then you use the GetValString method to get the MessageExpr. There are a bunch of PropertyObject methods with GetVal or SetVal. You have to use the one that is the same type as what you are getting. So in your case MessageExpr is a string so you have to use GetValString. If you were getting a reference you would use GetValIDispatch.
So your sequence would look like this:
Sequence.GetStep
Step.AsPropertyObject
PropertyObject.GetValString
Hope that helps.
Message Edited by Sam R on 07-19-2007 01:20 PM