Visible Inventor Drawings - Vault Check In

Visible Inventor Drawings - Vault Check In

SPALANIAPPANTN47S
Enthusiast Enthusiast
245 Views
1 Reply
Message 1 of 2

Visible Inventor Drawings - Vault Check In

SPALANIAPPANTN47S
Enthusiast
Enthusiast

Hi Guys,

I need to check in the multiple drawing files into vault by default macros in inventor.

 

For that, I tried using with the below code. 

 

Sub CheckInMultipleOpenDrawings()

Dim oDoc As Inventor.Document

For Each oDoc In ThisApplication.Documents.VisibleDocuments

If oDoc.DocumentType <> kDrawingDocumentObject Then
GoTo NextDoc

ElseIf oDoc.DocumentType = kDrawingDocumentObject Then

oDoc.Activate

oDoc.Save

Set ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
ControlDefinition.Execute2 (True)

oDoc.Close
End If

NextDoc:
Next

MsgBox "Checked-in the drawings"
End Sub

 

While using the above code, it will checking in only first and last file. Not working for all the opened drawing files.

 

For example , If i opened 5 drawings (Drawing number from 101 , 102, 103, 104 & 105)

Only 101 & 105 are getting checked in.

 

If u have any ideas to check all drawings..

Please suggest..

 

Thanks in advance..

 

@JhoelForshav @CGBenner @WCrihfield @Anonymous @Cadmanto @L.Greft @bradeneuropeArthur 

0 Likes
246 Views
1 Reply
Reply (1)
Message 2 of 2

bradeneuropeArthur
Mentor
Mentor

Have you tried this:

 

Sub CheckInMultipleOpenDrawings()

Dim oDoc As Inventor.Document

For Each oDoc In ThisApplication.Documents.VisibleDocuments

If oDoc.DocumentType <> kDrawingDocumentObject Then
GoTo NextDoc

ElseIf oDoc.DocumentType = kDrawingDocumentObject Then

oDoc.Activate

oDoc.Save

Set ControlDefinition = ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
ControlDefinition.Execute

oDoc.Close
End If

NextDoc:
Next

MsgBox "Checked-in the drawings"
End Sub

Otherwise.

 

Can you let me show the:

Vault options in inventor each dialog and settings, a screenshot please!

A screenshot of the vault browser for each drawing that keeps checked out.

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes