I'm currently working on a project for classifying our SolidWorks models. We will have up to 3 different classification strings possible for each file. My challenge with creating a pdm search at this very moment is that I cannot know, in which variable the search string is written.
As an example:
3 Classification strings possible
model: custom property as string: "Classification1", "Classification2" and "Classification3"
PDM: variables "Classification1" to "...3" refering to the corresponding custom property
The search string "Test" could be in any of the 3 custom properties/ variables.
In the PDM search tool I would realise it this way:
Now I'm searching for the "or"-connector in the API.
The code currently looks like this:
Set eSearch = eVault.CreateSearch
eSearch.AddVariable "Klassifizierung1", "Test"
eSearch.AddVariable "Klassifizierung2", "Test"
eSearch.AddVariable "Klassifizierung3", "Test"
Set eResult = eSearch.GetFirstResult
Do While Not eResult Is Nothing
But the variables are linked with an "and".
The only way I can think of solving this problem at the moment is to run 2 consecutive searches and merging the results afterwards. I can't believe there is no easier way to accomplish this.