Checking in/out non-Inventor files in Vault via iLogic

Checking in/out non-Inventor files in Vault via iLogic

Daan_M
Collaborator Collaborator
174 Views
2 Replies
Message 1 of 3

Checking in/out non-Inventor files in Vault via iLogic

Daan_M
Collaborator
Collaborator

Hi,

 

I currently have a code that writes data to an Excel file which is saved in Vault, this works fine, but i would like to check-in the Excel file in Vault at the end.

 

Daan_M_0-1732632387910.png

 

I see snippets to check-in/check-out active documents such as an assembly (Tested and this works great). But this doesn't work for the Excel file, since it's not an 'active document'.

 

Daan_M_1-1732632442137.png

 

Is it possible what i'm asking or is there no solution currently?

0 Likes
175 Views
2 Replies
Replies (2)
Message 2 of 3

daltonNYAW9
Advocate
Advocate

You can use the .addfile method.

 

iLogicVault.AddFile(fullfilename, vaultfolderpath)

 

https://help.autodesk.com/view/INVNTOR/2025/ENU/?guid=33786554-75a9-06db-a868-b42f2883a355

0 Likes
Message 3 of 3

daltonNYAW9
Advocate
Advocate

Heres how you would check a file back in using the vault api


Use this link for examples/documentation working with vault programmatically :
https://forums.autodesk.com/t5/inventor-programming-ilogic/vault-api-reference/td-p/11820257

 

AddReference "Autodesk.Connectivity.WebServices.dll"
Imports ACW = Autodesk.Connectivity.WebServices
AddReference "Autodesk.DataManagement.Client.Framework.Vault.dll"
Imports VDF = Autodesk.DataManagement.Client.Framework
AddReference "Connectivity.Application.VaultBase.dll"
Imports VB = Connectivity.Application.VaultBase
AddReference "Autodesk.DataManagement.Client.Framework.Vault.Forms.dll"

 

mVltCon = VB.ConnectionManager.Instance.Connection

Dim filepath() As String = {"$/Designs/test.xlsx" }

Dim wsFiles() As ACW.File = mVltCon.WebServiceManager.DocumentService.FindLatestFilesByPaths(filepath)

Dim mFileIt As VDF.Vault.Currency.Entities.FileIteration = New VDF.Vault.Currency.Entities.FileIteration(oVaultConnection, wsFiles(0))

If mFileIt.IsCheckedOut = True
	mVltCon.FileManager.CheckinFile(mFileIt, "", False, New ACW.FileAssocParam() {}, Nothing, False, Nothing, ACW.FileClassification.None, False)
End If
 
0 Likes