How to implement 'OR' for a variable value using only one instance of IEdmSearch5 interface and performing a single search loop in Enterprise PDM API?

Hello,


Please find attached a C# example using IEdmSearch5 interface.


In order to perform an effective search using  IEdmSearch5 interface in ePDM API, when the following search result is needed:

All files with *.doc extension, in 'Approved' state, that have 'Value1' OR 'Value2' as 'Variable Name',

how to this can be achieved using only one instance of IEdmSearch5 interface?

As found in help:

"There is a bit of overhead involved in creating an IEdmSearch5 interface so if you intend to perform several searches,

it might be a good idea to keep the interface and call IEdmSearch5::Clear on it instead of creating a new one via IEdmVault5::CreateSearch each

time."


Is there a way to perform IEdmSearch5::AddVariable twice for the same variable with two different values using OR condition with the same

IEdmSearch5 instance?

Or we must perform two separate searches using IEdmSearch5::Clear between and then filter the result?

We observed a noticeable downgrade in application performance when IEdmSearch5 is heavily used...


Please find attached a C# example using IEdmSearch5 interface.


Please note that the described search can be easily achieved in ePDM User Interface using default 'complete search' card and the variable tab.


Thank you,

Alex

SolidworksApi macros