11-27-2024 09:35 AM
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.
11-27-2024 12:44 PM
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.
11-27-2024 03:34 PM
Thanks.
What is the syntax of the lookup string for the AddFileLocation?
11-29-2024 01:36 PM
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]