iLogic CheckOut from Vault

iLogic CheckOut from Vault

Nejc.Leban
Advocate Advocate
4,899 Views
21 Replies
Message 1 of 22

iLogic CheckOut from Vault

Nejc.Leban
Advocate
Advocate

Greetings everyone.

 

I have spent a while trying to find a solution to my problem, but to no avail.

 

I would like to know if it's possible to automatically check out certain files in an assembly.

I know how to cycle through the files that need to be checked out, I just can't figure out how to check them out from vault.

I'm using Inventor Pro 2021 and Vault Basic.

Does anyone know the command for checking out files with iLogic?

 

Thank you.

Best regards,

Nejc

Accepted solutions (1)
4,900 Views
21 Replies
Replies (21)
Message 21 of 22

fshzhu04
Participant
Participant

Hello Koechl,

 

Actually the code can download the releated IDW for most of models from the search parameter like attached code, the item number was assign to iam or ipt and it's idw, and I havn't specific the ".idw" to search parameter. Up to now I can figure out what's difference bewteen the download IDW and the lose download IDW, those IDW's parameters and peroperties looks almost the same in Vault. The attached figures which I run the rule and get download ipt and it's idw also.

mSearchParams.Add("Item Name", "208926721")

fshzhu04_3-1668647328339.png

fshzhu04_1-1668647187058.png

 

 

0 Likes
Message 22 of 22

Markus.Koechl
Autodesk
Autodesk

The method iLogicVault.GetFileBySearchCriteria expects to specify search criteria that return a single result; the description of the method tells that only the first file found will download in case of multiple files found, so you should apply search criteria that return a single, unique result: 

        /// Search for a file by 1 to many search criteria as property/value pairs. 
        /// Downloads the first file found, if the search result lists more than a single file. Dependents and attachments are included. Overwrites existing files.
        /// Preset Search Operator Options: [Property] is (exactly) [Value]; multiple conditions link up using AND/OR condition, depending MatchAllCriteria = True/False
        /// Returns the file name downloaded (does not return names of downloaded children and attachments).

For your objective - downloading all files related to Item Number xy, use the method GetFilesBySearchCriteria (Note File vs. FileS in the name: 

        /// <summary>
        /// Search for multiple files by 1 to many search criteria as property/value pairs. 
        /// Downloads all files found, matching the criteria. Dependents and attachments are included. Overwrites existing files.
        /// Preset Search Operator Options: [Property] is (exactly) [Value]; multiple conditions link up using AND/OR condition, depending MatchAllCriteria = True/False
        /// Returns list of files names downloaded (does not return names of downloaded children and attachments).
        /// </summary>

I hope this helps to understand that your approach does not secure a consistent, predictable result.



Markus Koechl

Solutions Engineer PDM, Autodesk Central Europe