Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
Through some research I have put together an Ilogic rule that will check in all files that are open in Inventor. so far it works really well with one exception. Periodically the rule will just stop when it runs into a presentation file. I cant for the life of me figure out why. I have tried creating a case that is Inventor file specific. IE: part, assembly, drawing, and presentation. below is the version of the code with out the case function. any help or insight with this would be greatly appreciated.
thanks,
M1 = MessageBox.Show("do you want to check in all open files?", "Vault Check-in", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If M1 = vbYes Then
M2 = MessageBox.Show("This does not work for Presentation files ensure all Presentation files are saved and closed", "Vault Check-in", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop)
If M2 = vbOK Then
I1 = InputBox("Leave a Vault check-in comment bellow", "Vault Check-in", "ECR # ")
If I1 = ok Then
Return
Else
Q1 = MessageBox.Show("Have you saved all open files?","Vault Check-in", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2)
If Q1 = vbYes Then
Dim oDoc As Inventor.Document
For Each oDoc In ThisApplication.Documents.VisibleDocuments
'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)
'closes active file
ThisApplication.CommandManager.ControlDefinitions.Item("AppFileCloseCmd").Execute
Next
MessageBox.Show("Vault Check-in Compleate!!!!", "Vault Check-in")
Else
MessageBox.Show("Save Them Files!!!!","Vault Check-in")
End If
End If
Else
Return
End If
Else
Return
End If
Solved! Go to Solution.