NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand - documentation including icons

I have a sequence that can, for any sequence file, generate a text block
with every step's name and description.  It uses ActiveX actions.
 
Is there a way to out-put the icons for each of those steps as well?
 
I looked and looked, and could not find a way of including the MessageText (in pop-up windows) and Comment attributes either.
 
Thanks!
 
Links to helpful information also appreciated
 
guy dot f dot levin @ lmco dot com
 
0 Kudos
Message 1 of 4
(3,341 Views)

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:

IconName Property

Syntax

Step.IconName

Data Type

String

Purpose

Returns the icon's filename for the step.

Remarks

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.

LargeIcon Property (Read Only)

Syntax

Step.LargeIcon

Data Type

Picture

Purpose

Returns the large version of the icon that represents the step.

Remarks

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,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(3,315 Views)
Thanks for the response, but I need a bit more elucidation.
 
I found Step.asPropertyObject, but in searching the API, while I could find a Comment object,
there is no MessageExpr.
 
Specifically, what exactly do I do with this Property object reference once I retrieve it?
 
I tried this:
 
Object ref: locals.myProperty
object class: PropertyObject
                                            out                       in                 in
call: GetPropertyObject(locals.property, "MessageExpr", 0)
 
But this failed due to "Message Expr" being an unrecognized property.
0 Kudos
Message 3 of 4
(3,300 Views)

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

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 4
(3,297 Views)