Message 1 of 1
Inventor update "Vault Check-In" button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm trying to make iLogic that will update the Vault check-in button, if the part is checked-out by me. I have the part that checks status of the file, I'm struggling with the other part, that will update the button.
'API for Vault connection
AddReference "Autodesk.Connectivity.WebServices.dll"
Imports AWS = 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
Dim mVltCon As VDF.Vault.Currency.Connections.Connection
mVltCon = VB.ConnectionManager.Instance.Connection
If mVltCon Is Nothing Then
MessageBox.Show("Not Logged In to Vault")
Exit Sub
End If
Dim VaultPath As String = ThisDoc.Document.FullFileName
'Dim VaultPath As String = ThisDoc.PathAndFileName(True)
VaultPath = VaultPath.Replace("Workspace", "$")
'flip the slashes
VaultPath = VaultPath.Replace("\", "/")
Dim VaultPaths() As String = New String() {VaultPath}
Dim wsFiels() As AWS.File = mVltCon.WebServiceManager.DocumentService.FindLatestFilesByPaths(VaultPaths)
Dim mFileIt As VDF.Vault.Currency.Entities.FileIteration = New VDF.Vault.Currency.Entities.FileIteration(conn,wsFiels(0))
MsgBox(mFileIt.IsCheckedOutToCurrentUser)