Hide Table of Contents
CreateSearch2 Method (IEdmVault21)

Creates an interface to a search object.

Syntax

Visual Basic (Declaration) 
Function CreateSearch2() As IEdmSearch5
C# 
IEdmSearch5 CreateSearch2()
C++/CLI 
IEdmSearch5^ CreateSearch2(); 

Return Value

IEdmSearch5

Example

See the IEdmVault21 examples.

Remarks

This method creates a search object that allows you to search files and folders using multi-variable conditions, logical operators, and special search syntax. Once this search object is instantiated, special search syntax is allowed in all IEdmSearch* properties and method parameters. (See Search Syntax.)

To perform a search:

  1. Cast the returned IEdmSearch5 to IEdmSearch9.

  2. Add a single variable search condition using IEdmSearch8::AddVariable2. The new search allows you to specify the poValue parameter using special search syntax and eliminates the need to specify the lEdmVarOp parameter.

  3. Add a multi-variable search condition using IEdmSearch9::AddMultiVariableCondition. Special search syntax applies.

  4. Use the special search syntax in IEdmSearch5::FileNameIEdmSearch5::VersionCommentIEdmSearch5::State, and IEdmSearch6::SetToken.

  5. Call IEdmSearch5::GetFirstResult. If no results are returned, either nothing was found or there were search syntax errors.

  6. If step 5 returns no results, then see if there are search syntax errors by calling IEdmSearch9::GetSyntaxErrors. (Note: no syntax errors are reported unless advanced specifiers were placed before each search syntax.)

  7. If step 5 returns results, call IEdmSearch5::GetNextResult repeatedly to get further results.

C++ users must release the returned pointer, IEdmSearch5.

Return codes: 

  • S_OK: The method successfully executed.
 

See Also

Availability

SOLIDWORKS PDM Professional 2020


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   CreateSearch2 Method (IEdmVault21)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2020 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.