How to check-in inventor file to Vault without displaying the check-in dialog

How to check-in inventor file to Vault without displaying the check-in dialog

ls-4453
Enthusiast Enthusiast
500 Views
5 Replies
Message 1 of 6

How to check-in inventor file to Vault without displaying the check-in dialog

ls-4453
Enthusiast
Enthusiast

I know that this can be done with the following method.

 

https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/inventor-vault-add-in/m-p/10006193/h...

 

However, I want to do this without modifying the Vault Add-in options, so that the user's experience is not affected outside of my program. Is this possible?

0 Likes
501 Views
5 Replies
Replies (5)
Message 2 of 6

ls-4453
Enthusiast
Enthusiast

I would use the Vault API to do this, but it's not clear how this is possible.

 

https://adndevblog.typepad.com/manufacturing/2013/09/vault-2014-api-example-that-adds-a-file-and-ass...

 

Note: Currently the Vault API does not support adding cad files such as Inventor Assemblies.

Is this the case?

0 Likes
Message 3 of 6

eduane
Contributor
Contributor

Here is the code that I use:

 

ThisDoc.save
'envoke Check In dialogbox
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)
'inputs user comment and selects ok
System.Windows.Forms.SendKeys.SendWait(CommentBox & Chr(9) & vbCrLf & Chr(27))

This will still display the Check In dialog where it gives you a spot to leave a comment but simulates the user clicking the OK button so you won't notice it. 

 

This checks in any children files too btw. 

0 Likes
Message 4 of 6

ls-4453
Enthusiast
Enthusiast

Thank you, but for my purposes I need to be able to set all the options (include/do not include children, etc.) at execution.

0 Likes
Message 5 of 6

matt_jlt
Collaborator
Collaborator

Here is an old message where i posted some code to use HWND to get the form and you can set every option from there, but it is more complicated and requires you tap into the event manager etc.


https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/get-vault-check-in-window/m-p/106291...

 

Alternatively you can just use the Vault API directly as mentioned by others but i don't like doing that purely because there are lots of things to do / consider and checking-in is something i never wanted to risk getting wrong. Checking out is easier / less risk.

0 Likes
Message 6 of 6

ls-4453
Enthusiast
Enthusiast

Thank you, but unfortunately this approach will also change the user's Vault Add-In preferences. I'll have to figure out how to use the Vault API.

0 Likes