Inventor Vault Add In

Inventor Vault Add In

Anonymous
Not applicable
2,041 Views
12 Replies
Message 1 of 13

Inventor Vault Add In

Anonymous
Not applicable

Hi all,

 

I have a bunch of parts/assemblies/drawings in which I need to update a user parameter .

 

Following is my requirement:

1. check-out file

2. update user parameters and save

3. check-in file

 

I already have a VB application which can open files in Inventor, update user parameters and Save. The part which involves Vault(check-in & check-out) is what I am not sure of.

 

Is it possible to do the above steps using Vault plug-in API through Inventor? If not, please advise a suitable way.

 

Thanks in advance!

0 Likes
2,042 Views
12 Replies
Replies (12)
Message 2 of 13

JelteDeJong
Mentor
Mentor

I know its possible to use the vault API. But it's very difficult. I have a tool that does something similar and use a different approach. You can execute the check-in command from within inventor. That will check-in the file that you have opened at that moment but it will show you the standard check-in dialog. To work around that you can suppress that dialog when you start your program. 

To execute the check-in use this code.

ThisApplication.CommandManager.ControlDefinitions["VaultCheckinTop"]
oCtrlDef.Execute2(true)

you can suppress the dialog like this: 

suppressCheckin.png

 

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 13

bradeneuropeArthur
Mentor
Mentor

You need a vault extension/addin to update that property?

Or do you need an inventor addin that uses the Vault API to update the property?

Both is possible!

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

Message 4 of 13

Anonymous
Not applicable

Actually I need to update a user parameter inside the file. And that parameter is not mapped as a property in Vault. So check-out and check-in is definitely required.

 

And that is why I was thinking of check-out and check-in at the first place. Had it been a mapped property I could have just updated it from Vault.

 

Either way will work. But I would prefer if it's  " inventor addin that uses the Vault API " because then I will be able to control the check-in, check-out and model parameters from a single application. 

0 Likes
Message 5 of 13

Anonymous
Not applicable

Hi, Thanks for the answer.

 

I tried the following code as suggested:

 

 

 

Dim dInv As Inventor.Application

Dim oCtrlDef As ControlDefinitions
oCtrlDef = dInv.CommandManager.ControlDefinitions["VaultCheckinTop"]
oCtrlDef.Execute2(True)

 

 

 

 

But I am getting an error. See attached image.

I am using Visual Studio - Windows Form Application (VB).

 

Kindly let me know what is missing/wrong.

0 Likes
Message 6 of 13

JelteDeJong
Mentor
Mentor

I copied that code from a c# app.  This will probably work better:

Dim dInv As Inventor.Application

Dim oCtrlDef As ControlDefinitions
oCtrlDef = dInv.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
oCtrlDef.Execute2(True)

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

Message 7 of 13

Anonymous
Not applicable

Hi.

 

What's the difference between ("VaultCheckin") & ("VaultCheckinTop") ?

 

Thanks

0 Likes
Message 8 of 13

bradeneuropeArthur
Mentor
Mentor

Checkin is for the selection if I am correct!

Checkintop for the top assembly or part in browser, no selection required!

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 9 of 13

Anonymous
Not applicable

I am still getting an error. But this time error is different.

 

I think I am missing some reference or library files. Can you help on this?

 

See attached image for the error message.

0 Likes
Message 10 of 13

bradeneuropeArthur
Mentor
Mentor

Do you have a selection active?

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 11 of 13

Anonymous
Not applicable

I am using the below code.

I am able to open the file successfully and after that the code throws the error. I believe the opened file is the selection that you had asked. Right? If not, then I am not aware what selection are we talking about. 

Dim FileName As String
        FileName = "C:\V\HEX\Designs\GPHE Global Product Platform\FRAMES\CAPELLA\C063MA60A\C063MA50A-F-P.ipt" 'ComboBox1.Text

Dim odoc As PartDocument
odoc = dInv.Documents.Open(FileName)

        ' Trying to check-out the file
Dim oCtrlDef As ControlDefinitions
oCtrlDef = dInv.CommandManager.ControlDefinitions.Item("VaultCheckoutTop")
oCtrlDef.Execute2(True)

 

0 Likes
Message 12 of 13

bradeneuropeArthur
Mentor
Mentor

The code in the screenshot is different. Vaultcheckout!

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 13 of 13

Anonymous
Not applicable

I tried with 'Vaultcheckout' too. Same issue is coming.

0 Likes