PropertyObject.Search

Syntax

PropertyObject.Search( lookupString, searchString, searchOptions, filterOptions, elementsToSearch, limitToAdapters, limitToNamedProps, limitToPropsOfNamedTypes, subpropLookupStringsToExclude)

Return Value

SearchResults

A SearchResult object.

Purpose

Searches a property object and subproperties.

Remarks

Returns a SearchResults object that is a handle to the asynchronous search already in progress. To wait for the search to complete, call the SearchResults.IsComplete method.

Parameters

lookupString As String

[In] Specifies a lookup string that indicates the location of the subproperty of the PropertyObject on which to begin the search. If a match is found, the location of the match in the SearchMatch object is relative to the original PropertyObject, not the subproperty. You can pass an empty string for this parameter to begin the search at the root-level of the PropertyObject.

searchString As String

[In] Specifies the string or regular expression for which to search. To use regular expressions, you must pass the option SearchOptions_RegExpr for the searchOptions parameter of this method.

searchOptions As Long

[In] Specifies one or more SearchOptions constants. Use the bitwise-OR operator to specify multiple search options. The search option SearchOptions_IncludeSubsequenceFiles does not apply to this method.

filterOptions As Long

[In] Specifies one or more SearchFilterOptions constants. Use the bitwise-OR operator to specify multiple search filter options. Only the following filter options apply to this method: SearchFilterOptions_CustomStepProps , SearchFilterOptions_BuiltinStepProps , and SearchFilterOptions_ModuleStepProps .

elementsToSearch As Long

[In] Specifies one or more SearchElements constants. Use the bitwise-OR operator to specify multiple elements to search.

limitToAdapters As String Array

[In] Specifies an array of AdapterKeyNames constants to indicate the steps of which adapters to search. Pass an empty array or NULL to search steps that use any adapter.

limitToNamedProps As String Array

[In] Specifies an array of property names under which to limit the search. Pass an empty array or NULL to search all properties. If you specify names of properties to which to limit the search, TestStand searches only those properties with the names you specify and all their subproperties.

limitToPropsOfNamedTypes As String Array

[In] Specifies an array of type names to which to limit the search. Pass an empty array or NULL to search instances of all types. Use this parameter to limit the search instances of all types. Use this parameter to limit the search to instances of the types you specify.

subpropLookupStringsToExclude As String Array

[In] Specifies an array of lookup strings that indicate which subproperties to exclude from the search. Pass an empty array or NULL if you do not want to exclude any properties. You can pass a lookup string with the wildcard character ( * ) in place of any property name to indicate that all properties match that part of the lookup string. You can also use the wildcard character to match any element of an array by specifying the wildcard character ( * ) for the array element index. For example, if the property object you search is an array of steps, you can specify the lookup string "[*].Result" to exclude the Result property of all steps in the array.

Note When you exclude a subproperty, you also exclude all the subproperties the subproperty contains.

See Also

AdapterKeyNames

Engine.SearchFiles

SearchElements

SearchFilterOptions

SearchMatch

SearchOptions

SearchResults

SearchResults.IsComplete

Thread Safety of the PropertyObject API and TestStand Variables