Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

How to Save copy as, straight into vault

J.VandeMerckt
Advocate

How to Save copy as, straight into vault

J.VandeMerckt
Advocate
Advocate

Hi Forum

 

I have this line of code which saves my configurable part with a custom filename.
It works as intended.

 

Problem is I would like this file to be checked into the vault instead of saved in file explorer.

Can anyone help me change the code so the part is also checked into the vault.

 

Dim currentfilename As String
Dim choice As String
Dim length As String


currentfilename = ThisDoc.FileName(False)

choice = Parameter("FixedUnit_Curve")
length = Parameter("FixedUnit_Length")

'custom filepath
'SetTheFilePathHere = "C:\ ... your filepath ..."

'filepath same as the current ipt
SetTheFilePathHere = ThisDoc.Path

SetTheFilenameHere = currentfilename & " - " & choice & " - L" & length & "mm"


ThisApplication.CommandManager.PostPrivateEvent(kFileNameEvent, SetTheFilePathHere &"\" & SetTheFilenameHere & ".ipt")

Dim oCtrlDef
oCtrlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppFileSaveCopyAsCmd")
oCtrlDef.Execute

 Thank you for helping.

 

BR

Justin

0 Likes
Reply
Accepted solutions (1)
754 Views
8 Replies
Replies (8)

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Dim oCtrlDef
oCtrlDef = ThisApplication.CommandManager.ControlDefinitions.Item("AppFileSaveCopyAsCmd")
oCtrlDef.Execute

Dim oCtrlDefChin
oCtrlDefChin = ThisApplication.CommandManager.ControlDefinitions.Item("VaultCheckinTop")
oCtrlDefChin.Execute '.Execute2(True)

Regards,

Arthur Knoors

Autodesk Affiliations:

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: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 !

0 Likes

J.VandeMerckt
Advocate
Advocate
Hey Arthur

Now the checkin window opens. but only after I close my form.
is there a way to close the form after the Ilogic ran, and then press ok automatically on the checkin window?
0 Likes

J.VandeMerckt
Advocate
Advocate
Thank you btw, another step forward!
0 Likes

bradeneuropeArthur
Mentor
Mentor
Then you need to use the Vault API.
What version of Vault are you using?
Professional
Basic

Regards,

Arthur Knoors

Autodesk Affiliations:

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: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 !

0 Likes

J.VandeMerckt
Advocate
Advocate
We're using Vault basic 2020.
0 Likes

bradeneuropeArthur
Mentor
Mentor
Vault Basic is not api supported.

Regards,

Arthur Knoors

Autodesk Affiliations:

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: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 !

0 Likes

J.VandeMerckt
Advocate
Advocate
But it would be possible with vault pro or maybe Windchill PLM? (if you're familiar with windchill system)
0 Likes

bradeneuropeArthur
Mentor
Mentor

With Vault Professional it is possible yes.

Regards,

Arthur Knoors

Autodesk Affiliations:

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: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 !