07-30-2008 03:19 AM
07-30-2008 04:36 AM
Hi,
Simple answer - No.
Regards
Ray Farmer
07-30-2008 09:34 AM
07-30-2008 02:52 PM
One possible way to do this will be to use the PropertyObject.Search() method.
If you run this method on the StationGlobals property object, you can use SearchOptions_RegExpr to specify that your search string is a regular expression. Regular expressions can match multiple values. TestStand will then return a SearchResults object that is a collection of all of the matching PropertyObjects. Once you have an individual SearchMatch, you can use the GetPropertyPath method to get the lookup string to the property. Then you will need to call DeleteSubProperty on the original StationGlobals property object and pass it the lookup string that was returned.
Please note that I found all of this information by looking through the TestStand help and have not tested it, so I may have left out a step or two somewhere.
07-30-2008 04:50 PM
Hi,
Just to add what Josh has said.
The SearchMatch.GetPropertyLocation(True) will probably return only a relative location from where you took the search property.
ie if you took StationGlobals as the start, and you where searching for occurrances of "administrator" then you would probably get two hits and the first would be at "TS.LastUserName" which is the returned string from GetPropertyLocation.
Also the PropertyObject.Search(...) has a number of parameters which are arrays, these can be empty or NULL. The only way I have made this work is by using a Locals array which is empty.
You can get the number of hits on your search by using SearchResult.NumMatches. You dont have to wait for the search to complete to call this so you could put this in a loop and check for IsComplete to be true.
Hope this helps
Regards
Ray Farmer
07-31-2008 12:53 AM
Hi,
Adding to my last comment.
If you use
PropertyObject.Search("", "^a", 0x4, 0x00FFFFFF, 0x1, Locals.emptyArrayStr, Locals.emptyArrayStr, Locals.emptyArrayStr, Locals.emptyArrayStr) you need to setup Locals.emptyArrayStr as an empty String Array. Use StationGlobals as the ActiveX Reference.
This should return back a SearchResult of all the Property Names beginning with "a" within the StationGlobals.
Hope this helps
Regards
Ray Farmer