AnsweredAssumed Answered

Enterprise PDM 2013 API search results

Question asked by Giorgos Georgoudakis on Mar 20, 2013
Latest reply on Mar 21, 2013 by Lee CS Young

Hello,

 

I have written a VB.Net application that searches pdm vault for parts and return some variables to the user.

This application was developed and worked fine on SolidWorks ePDM 2012.

 

But last week we upgraded to 2013 and since then the application has the following problem:

 

I am searching for a file on vault which has a variable "partNo" provided by the user and return the results in a listview.

 

After the upgrade the listview contains multiple lines of the same file.

I have figure out that the amount of repeated results of the file is depending on how many configurations this file has.

 

ex. A .dxf file which has 3 layers is shown 4 times in my list.

all .pdf files are shown only 1 time.

.sldprt files which have 2 configurations is shown 3 times in my list.

 

This didnt happend before the upgrade.

Is there any way to filter results by adding something to search?

 

The code used something as simple as that:

Dim search As IEdmSearch5

Dim file As IEdmFile5

search = vault.CreateSearch

search.AddVariable("PartNo", "%" & PartNo.Text)

search.FindHistoricStates = False

Dim result As IEdmSearchResult5

result = search.GetFirstResult

While Not result Is Nothing

...

...

...(populate list)

...

...

     result = search.GetNextResult

Next

 

 

While debugging I see that it loops on the exact same file multiple times as i said before.

Outcomes