09-07-2010 12:52 PM
Hi, dear ALL
TestStand has the utility "Find/Replace" (Edit menu). Is it possible to execute this tool via TestStand API? I want to select a set of steps in the sequence and pass the result to the "Find Results 1" tab..
Regards,
Max
Solved! Go to Solution.
09-08-2010 10:36 AM
Is is possible to do a search programmatically (and make edits programmatically based on the results), however you cannot show the results in the Find Results window.
See the the online API documentation for more info:
PropertyObject.Search
Engine.SearchFiles
SearchResults
If you have an idea for improving Find/Replace functionality in TestStand, please consider posting it to the TestStand Idea exchange:
http://forums.ni.com/t5/NI-TestStand-Idea-Exchange/idb-p/teststandideas
Hope this helps,
-Doug
09-10-2010 03:57 AM
Doug, many thanx for useful reference to API. The main problem doesn't concern with improving of Search utility... to be more detailed I develop a Tool that examines every step in the current sequence and finds errors in expressions. As a result for now the Tool outputs a list of steps with errors to the execution output window. This result is acceptable, but not easy-to-use cause you have to move to the erroneous step manually.
It will be more comfortable to jump to the step as from "Search Results 1" window.. Object reference to the step is available. The problem is how to use this reference to jump to the specified step of a current sequence..
Could you suggest any idea?
Regards,
Max
09-10-2010 09:20 AM
Two things to mention:
1) OutputMessages can have locations associated with them so that when you double-click on them, the sequence editor goes to the location. You can set the Location after creating the outputmessage with Engine.NewOutputMessage() (don't pass a sequence context in this case) and before Posting (i.e. before calling OutputMessage.Post()). The easiest way to add a location is by calling myOutputMessage.Locations.AddFileLocationByObject() and passing the reference you have to the step. See the API online help for more information.
2) I strongly recommend you take a look at TestStand 2010, there is currently a beta you can sign up for at:
http://forums.ni.com/t5/NI-TestStand/Announcing-the-TestStand-2010-Beta-Program/m-p/1136621
Hope this helps,
-Doug
09-14-2010 09:37 AM
Doug, thank you very much. Your link to "Locations" is very useful.
11-30-2010 09:40 AM
Consider upgrading to TestStand 2010 which comes with a Sequence Analyzer that helps you find problems, such as expression errors, in sequences before you execute them.