- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I use Inventor/Vault Pro 2018 at the moment and so following code works fine.
On the new version (2022) this code works also (without errors) but the messagebox is empty.
Header of this file:
'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
File:
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")
Return "error"
End If
Dim VaultPath As String = oDoc.FullFileName
'Dim VaultPath As String = ThisDoc.PathAndFileName(True)
VaultPath = VaultPath.Replace(Environ("USERPROFILE") & "\Workspace\", "$/")
'flip the slashes
VaultPath = VaultPath.Replace("\", "/")
Dim VaultPaths() As String = New String() {VaultPath}
Dim wsFiels() As AWS.File = mVltCon.WebServiceManager.DocumentService.FindLatestFilesByPaths(VaultPaths)
MsgBox(wsFiels(0).FileRev.Label.ToString)
Dim mFileIt As VDF.Vault.Currency.Entities.FileIteration = New VDF.Vault.Currency.Entities.FileIteration(conn,wsFiels(0))
Dim lifeCycleInfo As VDF.Vault.Currency.Entities.FileLifecycleInfo = mFileIt.LifecycleInfo
If (GetData = "SetRev") And oDoc.FullFileName.Contains(ThisDoc.FileName(False)) = True Then
MsgBox(iProperties.Value(oDoc, "Custom", "TEST_Version") & "," & wsFiels(0).FileRev.Label)
End If
The problem is, that the Messagebox
wsFiels(0).FileRev.Label
is always empty.
In Inventor 2018 it is filled correctly, but in Inventor 2022 not.
I have already seen a solution by MarkusKoechl, but is there an easy solution for that problem with this code?
Regards
PDM/CAD Administrator
Using Inventor/Vault 2022.2
Using Inventor/Vault 2022.2
Solved! Go to Solution.
Link copied