Open drawing from vault, save and check back in

Open drawing from vault, save and check back in

Kassenbouw
Enthusiast Enthusiast
1,353 Views
7 Replies
Message 1 of 8

Open drawing from vault, save and check back in

Kassenbouw
Enthusiast
Enthusiast

Hi Guys,

 

Does anyone have a code to for opening the drawing of a part or assembly from the vault, save it and check back in? I want to use this for updating some drawings.

 

I have found this code to check in all open drawings:

https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/vault-check-in-through-ilogic/td-p/9811...

 

And this code to check out a drawing from the vault:

https://forums.autodesk.com/t5/inventor-ilogic-api-vba-forum/ilogic-open-drawing-from-vault-default/...

This one opens the drawing and asks if I want to check out. Is there a way to open the drawing hidden and check out without asking?

 

Hope someone can put these together and add the saving part.

Thanks in advance!

0 Likes
1,354 Views
7 Replies
Replies (7)
Message 2 of 8

bradeneuropeArthur
Mentor
Mentor

Do you have all files locally on your workspace available, you need to open from Vault?

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
Message 3 of 8

bradeneuropeArthur
Mentor
Mentor

I have an add in that uses local files and batch some commands:

bradeneuropeArthur_0-1633795483945.png

  1. Check Out From Vault
  2. Update and Save
  3. Not relevant for you at the moment
  4. Not relevant for you at the moment
  5. Not relevant for you at the moment
  6. Check In to Vault

Is this what you need?

 

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
Message 4 of 8

Kassenbouw
Enthusiast
Enthusiast

Yes all files are on my workspace. If not, i can 'Get' them from the Vault. 

0 Likes
Message 5 of 8

Kassenbouw
Enthusiast
Enthusiast

This is not exactly what I was looking for but seems verry handy. Where can I get this add-in?

Does this only work with Drawing files? Or is this useable for iam and parts as well?

 

What I am looking for in this topic is to automaticly check-out, save (update and run rules before save) and check back in. This rule must run from the part or iam. That way I dont have to open the drawings anymore. 

0 Likes
Message 6 of 8

bradeneuropeArthur
Mentor
Mentor
It is an add in created by myself.
If you are interested please send me a message and we can take look what is possible.

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
Message 7 of 8

Kassenbouw
Enthusiast
Enthusiast

After combining some pieces of code I came up with:

 

Dim oDoc As Document
oDoc = ThisDoc.Document

Dim oRefDoc As Document
Dim oDrawDoc As DrawingDocument
Dim xDoc As Document = ThisApplication.ActiveDocument
    
    For Each oRefDoc In oDoc.AllReferencedDocuments
        oBaseName = System.IO.Path.GetFileNameWithoutExtension(oRefDoc.FullFileName)
        oPathAndName = System.IO.Path.GetDirectoryName(oRefDoc.FullFileName) & "\" & oBaseName
        If(System.IO.File.Exists(oPathAndName & ".idw")) Then
            oDrawDoc = ThisApplication.Documents.Open(oPathAndName & ".idw", True)
        ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckoutTop").Execute2(False)        
        xDoc.Save              
        ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop").Execute2(False)               
        ThisApplication.CommandManager.ControlDefinitions.Item("AppFileCloseCmd").Execute
        End If
    Next

This is for all referenced documents in my assembly. 

 

How do I add the anwer 'OK' to the question 'Check Out / Check in'?

0 Likes
Message 8 of 8

tancredi.barbuscia
Contributor
Contributor

hallo Artur, your addin could save my life. is it possibile to have it?

 

0 Likes