NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Goto Location Feature in the sequence analyzer

I want to mimic the Goto Location Feature in the sequence analyzer.

Anyone know which API should I use?

 

I'm creating a sequence to be used under the Tools menu in the Sequence Editor.

I know how to get the sequence and step as reference.

But I don't know how to make Sequence Editor show the sequence/step I want.

 

Please help.

 

George Zou
0 Kudos
Message 1 of 4
(91 Views)

Look at Location object and Locations collection in TestStand Help

 

The properties of a Location object contain enough information for a user interface to find a specific piece of data the user interface displays.

Locations is a collection of Location objects. Use Locations to instruct the user interface to update the selection. Follow these steps to set the selection in a user interface:

Call the Engine.NewLocations method to create a Locations object.
Call the Locations.AddFileLocation, Locations.AddExecutionLocation, or Locations.AddTypeLocation method on a Locations object to specify data for the user interface to select.
Call the Locations.GotoLocation method on the Locations object to send the Locations object to the user interface.
The user interface receives the Locations object through the UIMessage.ActiveXData property of a UIMsg_GotoLocation UIMessage.
If the user interface supports the Goto location action, it updates the selection to correspond to the Locations object.
Message 2 of 4
(54 Views)

Thanks.

 

What is the syntax of the lookup string for the AddFileLocation?

 

George Zou
0 Kudos
Message 3 of 4
(32 Views)

Looking at the help for Locations.AddFileLocation it says:

This method specifies the lookupString parameter relative to the root of the PropertyObjectFile object. For example, if the location is underneath the PropertyObjectFile.Data element, the lookup string must use the Data. prefix.

So to access the first step in MainSequence you could open the file in the Sequence Editor and look at the Variables pane and navigate to:
    RunState.SequenceFile.Data.Seq["MainSequence"].Main["My Action Step"]

 

The AddFileLocation lookupString parameter would be:

    Data.Seq["MainSequence"].Main["My Action Step"]

or 

    Data.Seq["MainSequence"].Main[0]

Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 4
(13 Views)