Hi I am working on a addin for Inventor/vault
Is it possible to get Inventor Options.. Representation LOD from vault are this stored as vault property ?
If the Representation info isn't stored in vault ,is it possible to get the
location of of the selected file in the File Store
René J
Thanks Doug
I am using Inventor/Vault 2009
I know how to find the current file in vault.
I am using the Inventor project file instead of WorkingFolders.xml there are more info like
map folders libraries.
Representation LOD.. is not a iproperty.
I believe it was a info or property for this in the
vault, because if you select file from vault in Inventor
you have thes option see attach.
My code is working on my locale machine, but I am not
sure if this is right to do, or how to
get it to working on a server.
Dim files As DocumentSvc.File() = docSvc.GetFilesByMasterId(MasterID)
Dim file As DocumentSvc.File
Try
If (Not files Is Nothing AndAlso files.Length > 0) Then
file = docSvc.GetLatestFileByMasterId(MasterID)
files = Nothing
Else
MsgBox("Error - File Not found")
Exit Sub
End If
'Get the last file checked in to vault
Dim vfile As DocumentSvc.File = docSvc.GetFileByVersion(file.MasterId, file.MaxCkInVerNum)
Dim strFullFileName As String
{color:#ff0000}Dim strLocation_of_VaultFileStore As String = "C:\ProgramData\Autodesk\VaultServer\FileStore"
{color}
Dim vaultDatabase As String = VaultServiceManager.VDataBase
Dim strfiltype As String = Strings.Right(file.Name, 4)
Dim strmaps As String = "000\000\000\000\000\000"
Dim StrFilename As String = vfile.MasterId & "_" & vfile.Id & "_" & vfile.MaxCkInVerNum & strfiltype
'Get the physical Fullfilename in vaultFilestore
strFullFileName = strLocation_of_VaultFileStore & "\" & vaultDatabase & "\" & strmaps & "\" & vfile.MasterId & "\" & StrFilename
'strFullFileName = "C:\test\assembly.iam"
If System.IO.File.Exists(strFullFileName) = False Then
Exit Sub
End If
Dim oFileManager As FileManager
oFileManager = oApp.FileManager
Dim strGetDesignVRep() As String
strGetDesignVRep = oFileManager.GetDesignViewRepresentations(strFullFileName)
Dim strGetPosRep() As String
strGetPosRep = oFileManager.GetPositionalRepresentations(strFullFileName)
Dim strGetLODRep() As String
strGetLODRep = oFileManager.GetLevelOfDetailRepresentations(strFullFileName)
René J
Doug thanks
For you suggestions.
I have changed My program it work great now.
I don't know why I have calls the three functions GetFilesByMasterId...
Thanks for you help
René J