Inventor files Check in to the vault

Inventor files Check in to the vault

SPALANIAPPANTN47S
Enthusiast Enthusiast
1,367 Views
8 Replies
Message 1 of 9

Inventor files Check in to the vault

SPALANIAPPANTN47S
Enthusiast
Enthusiast
While Running this program , its prompting to click ok. How to do it automatically.
 
If any ideas, suggest me.
 
 

@Anonymous @WCrihfield @Cadmanto 

 

0 Likes
1,368 Views
8 Replies
Replies (8)
Message 2 of 9

SPALANIAPPANTN47S
Enthusiast
Enthusiast
While Running this program , its prompting to click ok. How to do it automatically.
Sub Check_In_Test()
 
ThisApplication.ActiveDocument.Save
 
Dim CmdMan As ControlDefinition
Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
'or useVaultCheckin
' CmdMan.Execute

CmdMan.Execute2 (True)
End Sub
If any ideas, suggest me.
 

 

 

0 Likes
Message 3 of 9

L.Greft
Advocate
Advocate

If you go to the Vault tab in Inventor and click on "Vault Options", I think the option "Check in Dialog" should work.

 

Check out my ideas: https://autode.sk/2TKe6LH
0 Likes
Message 4 of 9

WCrihfield
Mentor
Mentor

Maybe try putting this line after your Execute line.

System.Windows.Forms.SendKeys.SendWait("{ENTER}")

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 9

WCrihfield
Mentor
Mentor

You can also try Executing the following command, similarly to how you are executing the existing command.

 

"AppContextual_OKCmd"

or

"AppNGX_OKCmd"

 

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 6 of 9

Cadmanto
Mentor
Mentor

@SPALANIAPPANTN47S 

I am not sure if you are looking to do this through iLogic or by natural means.

My suggestion would be to look at the Vault Options within Inventor and see which ones work the best for your situation.

CheckIn.png

 

EE LOGO.png
Windows 10 x64 -16GB Ram
Intel i7-6700 @ 3.41ghz
nVidia GTS 250 - 1 GB
Inventor Pro 2021

 

Best Regards,
Scott McFadden
(Colossians 3:23-25)


0 Likes
Message 7 of 9

SPALANIAPPANTN47S
Enthusiast
Enthusiast

Without changing the inventor settings - vault options, How to click the OK button via code

 

I use app contextual command also but not working..

 

Sub Check_In_Test()
 
ThisApplication.ActiveDocument.Save
 
Dim CmdMan As ControlDefinition
Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
'or useVaultCheckin
' CmdMan.Execute

CmdMan.Execute2 (True)
ThisApplication.CommandManager.ControlDefinitions.Item("AppContextual_OKCmd").Execute()

End Sub
0 Likes
Message 8 of 9

SPALANIAPPANTN47S
Enthusiast
Enthusiast
0 Likes
Message 9 of 9

WCrihfield
Mentor
Mentor

   Our company is not currently using Vault, so I'm not that familiar with it.   All I can do in this situation is make educated guesses, based on previous similar situations, without being able to test my theories on my local PC.  So, I may not be much more help on this issue.

   All I know is that I have used both of the codes I posted earlier for other similar situations, and they worked for those situations.  The SendKeys method is often a 'last resort' method, because it can be a little unstable/unpredictable.  In some situations, when I use that method, I had to precede that line of code with another like the following, before it would work.

 

AppActivate(ThisApplication.Caption)
System.Windows.Forms.SendKeys.SendWait("{ENTER}")

 

That extra preceding line, as I understood it, was used to return system 'focus' back to the main Inventor application's window, from wherever it was, so that the SendKeys signal was being sent to the correct target.  It's a little complicated, so below I have a couple of links to Microsoft's pages for these methods.

SendKeys Class 

Interaction.AppActivate Method 

(Don't forget to click on the little drop-down list near the top right corner of these webpages and change C# to VB, to the examples will change to vb.net examples.)

Good luck.

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click 'LIKE' 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes