- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Check In dialog box: Need to have OK button selected as default - iLogic
iLogic code request!
Currently, OK is not selected. We handle so many documents that we never input data for comments. Therefore we would like OK button is already selected so that by pressing enter (like the dialog box for Save) the document will be checked in.
Request help. Currently, I use the code shown below:
Sub Main()
oCheckIN()
End Sub
Sub oCheckIN()
ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomallCmd").Execute
iLogicVb.UpdateWhenDone=True
'ThisDoc.Document.Save()
'
'ThisApplication.ActiveView.Fit
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)
End Sub
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I guess this should be the default from within Inventor with "Comments" can still be typed in optionally.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If you add
System.Windows.Forms.SendKeys.Sendwait(Chr(9) & vbCrLf)
It will complete the check in, but if you want a comment you either have to allow them to type the comment and hit tab and enter, or you could hard code it like
System.Windows.Forms.SendKeys.Sendwait("comment" & Chr(9) & vbCrLf)
Or get it as a string from somewhere else.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for the reply. I appreciate the coding.
'
'ThisApplication.ActiveView.Fit
ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomallCmd").Execute
'Check In dialogbox
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)
'To send by pressing ENTER button.
System.Windows.Forms.SendKeys.Sendwait("comment" & Chr(9) & vbCrLf)
I tried with the coding as shown above: I still get it as shown below. Basically, I need to execute check-In by pressing the ENTER button. It makes faster checking the documents.
Request to fix - if you don't mind.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What version of vault do you have? it looks like you need to have another tab to get to the "enter"
System.Windows.Forms.SendKeys.Sendwait(Chr(9) & "Checked In using Ilogic" & Char(9) & vbCrLf)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks for the reply. I do with Vault Basic - 2015 and Autodesk Inventor Professional - 2015
Still, it des not check in when the ENTER button is pressed. The cursor keeps blinking in the Checking dialog box white text box. FYI, please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
If you cut and paste my last post there was a typo in it, I had an "a" in the second Chr(9). Its fixed below. The Chr(9) is = to tab so if your still only in the comments add another "& Chr(9)".
System.Windows.Forms.SendKeys.Sendwait(Chr(9) & "Checked In using Ilogic" & Chr(9) & vbCrLf)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I tried several options. But, still I could not get this around. I feel like you are right: it needs a couple of TABS. So, the right combination of Chr(9)s is required.
Do you mind fixing the code below (it looks weired, because I tried several options hopelessly)
ThisApplication.CommandManager.ControlDefinitions.Item("AppZoomallCmd").Execute
ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(True)
System.Windows.Forms.SendKeys.Sendwait("comment" & Chr(9) & vbCrLf _
& vbCrLf & "comment" & Chr(9) _
& vbCrLf & "comment" & Chr(9) _
& vbCrLf & "" _
& vbCrLf & "comment" & Chr(9) & vbCrLf)
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I know this thread is old but this is what I have so far and it works well but I cannot get it to work for different types of files. I want this to run through everything I have open be it drawings, assemblies, and parts and check them all in. Does anyone know how to make this happen?
'comment prompt
CommentBox = InputBox("Leave a Vault check-in comment bellow", "Vault Check-in Comment", "Default Entry")
If CommentBox = ok Then
Return
Else
Dim oDoc As Inventor.Document
For Each oDoc In ThisApplication.Documents.VisibleDocuments
oDoc.Save
'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
Next
ThisApplication.CommandManager.ControlDefinitions.Item("AppFileCloseCmd").Execute
End If
MessageBox.Show("Vault Check-in Compleate", "Vault")