Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is FindFilesBySearchConditions the same as Vault Advanced Find Form?

3 REPLIES 3
Reply
Message 1 of 4
Arias79
645 Views, 3 Replies

Is FindFilesBySearchConditions the same as Vault Advanced Find Form?

 

Hello,

 

I'm using the VaultBrouserSample included with the SDK in Vault 2014 to find all files with a certain String contained in the File Name. Surprisingly I found that the API functions returns diferent results that the Vault Find froms (See attaced pictures).

 

The API's results contain all the characters included in the search condition striong, but not all of them in a row. Is this expected behaviour? Is there any configuration opction to change this?

 

This is the configuration on my search:

 

PropDefId = 10, // File Name,
PropTyp = PropertySearchType.SingleProperty,
SrchOper = 1, // Contains
SrchRule = SearchRuleType.Must,
SrchTxt = File_Name, // Text

 

Please advice if I'm missing some additional configuration.

 

Thanks

 

Pablo

3 REPLIES 3
Message 2 of 4
Redmond.D
in reply to: Arias79

Yes, the Advanced Find Form uses FindFilesBySearchConditions in the back end. 

Looking at your screenshots, it looks like DWF files are the main difference in the results.  DWF files are hidden by default, so my guess is that the Advanced Find Form is filtering hidden files and our custom form is not.  At the API level, File.Hidden is just meta data.  It's up to the client to honor or ignore the setting.



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 4
Arias79
in reply to: Redmond.D

 

Hi Doug,

 

Thanks very much for the quick answer.

You are correct it is only the DWF files that does not complain with the search criteria (File name contains TXT).

 

Pablo

Message 4 of 4
Arias79
in reply to: Arias79

 

Hi Doug, and everybody else:

 

After playing a bit more with the "FindFilesBySearchCondition", I'm convinced that it behaves the same as the Vault advance Find. But I’m not sure this is the intended behaviour. At least is not what I expected.

 

In the attached “TPN11.bmp” you will see how the search returns a lot of files that contains the characters “T”, “P”, “N” “1” and “1” in the right order, although not consecutive (Not only dwf files). That's not what I expected but I can work around this by filtering the search results.

 

More annoying is the difference between the searches “114165.bmp”, that returns a bunch of files with the string “114165” in the file name, and the search in “11416.bmp”, that does not find any file with the string “11416” in the file name… I’m very confused by this results.

 

Has anybody experience issues with this function before?

I’m I doing something wrong in my search settings?

 

Thanks for the help

 

Pablo

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report