Access to Vault file properties through Inventor

Access to Vault file properties through Inventor

Anonymous
Not applicable
842 Views
2 Replies
Message 1 of 3

Access to Vault file properties through Inventor

Anonymous
Not applicable

Hello,

 

I'm trying to write a program that will allow me to read an iProperty value of an Inventor file in Vault.

 

I can't get past the first hurdle of establishing the connection. The code below produces the following errors:

Error on Line 6 : Type 'VDF.Vault.Currency.Connections.Connection' is not defined.
Error on Line 9 : 'Connectivity' is not declared. It may be inaccessible due to its protection level.

 

Imports Autodesk.DataManagement.Client.Framework.Vault
Imports Autodesk.Connectivity.WebServices
Imports VDF = Autodesk.DataManagement.Client.Framework
Imports ACW = Autodesk.Connectivity.WebServices

Dim myConnection As VDF.Vault.Currency.Connections.Connection = Nothing
' Get the Vault connection from 
' the Inventor Vault log in
myConnection = Connectivity.Application.VaultBase.ConnectionManager.Instance.Connection()

 Any tips on what I'm missing? I'm writing in the iLogic environment of Inventor.

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

bradeneuropeArthur
Mentor
Mentor

https://forums.autodesk.com/t5/inventor-customization/use-inventor-vault-add-in-through-inventor-api...

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 3

bradeneuropeArthur
Mentor
Mentor

Hi,

 

I thought that you needed the vault properties from inventor.

Mistake.

 

What version of inventor and vault are you using, because they need a different approach regarding the connection.

 

put this is your code and the rest will explained by press enter after this code snap.

 

Implements IExplorerExtension

 

 

you get some events where the connection is provide automatically.

 

 Public Function CustomEntityHandlers() As IEnumerable(Of CustomEntityHandler) Implements IExplorerExtension.CustomEntityHandlers
        Return Nothing
    End Function

    Public Function HiddenCommands() As IEnumerable(Of String) Implements IExplorerExtension.HiddenCommands
        Return Nothing
    End Function

    Public Sub OnStartup(application As IApplication) Implements IExplorerExtension.OnStartup
        'Throw New NotImplementedException()
    End Sub

    Public Sub OnShutdown(application As IApplication) Implements IExplorerExtension.OnShutdown
        ''Throw New NotImplementedException()
    End Sub

    Public Sub OnLogOn(application As IApplication) Implements IExplorerExtension.OnLogOn
               
        oConn = application.Connection

    End Sub

    Public Sub OnLogOff(application As IApplication) Implements IExplorerExtension.OnLogOff
        ''Throw New NotImplementedException()
    End Sub

 

 

Please let me know if it works for yout.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes