Save and check in all open documents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am trying to write an Ilogic code that saves and basically checks in all open documents in Inventor to Vault. Both IPT's, IAM's and drawings. It does not check in all documents, but I can't figure out why...
It looks like this.
Dim app As Inventor.Application = ThisApplication M1 = MessageBox.Show("Vill du checka in alla öppna filer?", "Vault Check-in", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If M1 = vbYes Then Dim oDoc As Inventor.Document For Each oDoc In ThisApplication.Documents.VisibleDocuments oDoc.Activate() saveCmd = app.CommandManager.ControlDefinitions("AppFileSaveCmd") saveCmd.Execute MessageBox.Show(oDoc.DisplayName) "Line for debuggind purposes" MessageBox.Show(ThisApplication.ActiveDocument.Displayname) "Line for debuggind purposes" ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(True) Next MessageBox.Show("Vault Check-in klar", "Vault Check-in") End If Return
I cant get it to work as intended.
Will someone please have a look?
Best Regards
Alex