Use iLogic to Click on Vault Dialogue Button

Use iLogic to Click on Vault Dialogue Button

Anonymous
Not applicable
3,118 Views
18 Replies
Message 1 of 19

Use iLogic to Click on Vault Dialogue Button

Anonymous
Not applicable

Hello,

 

Here is my process situation:

 

- Drawing file is opened from Vault

- Drawing file is NOT checked out. 

- I DO NOT WANT TO CHECK THE FILE OUT

 

- iLogic is activated by user

     - iLogic adds text to the drawing

 

- User is prompted "FILE.DWG" is not checked out." "Do you want to check it out?"  } This is what i need help with. 

     - SELECT NO                                                                                                          } What ilogic code is used to "CLICK THE NO BUTTON"

 

- iLogic continues to run and print the file

 

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

iLogic should click the NO button, not the user. 

 

 

 

0 Likes
Accepted solutions (2)
3,119 Views
18 Replies
Replies (18)
Message 2 of 19

marcin_otręba
Advisor
Advisor

maybe better way will be to disable it for batching the file ?

 

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 3 of 19

marcin_otręba
Advisor
Advisor
Or using silentoperations=True.

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 4 of 19

bradeneuropeArthur
Mentor
Mentor
This can be done with the commandmanager and "no " something like this.
Need to look fir the exact name later. Not on my desk....

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 5 of 19

Anonymous
Not applicable

Unfortunately, this did not work.

 


@marcin_otrębawrote:
Or using silentoperations=True.

 

0 Likes
Message 6 of 19

Anonymous
Not applicable

Do you have the code I would use for that?

 

I haven't been able to find it online or get it to work.

0 Likes
Message 7 of 19

Anonymous
Not applicable

@bradeneuropeArthurwrote:
This can be done with the commandmanager and "no " something like this.
Need to look fir the exact name later. Not on my desk....

Do you have the code for this?

 

I could not find it online and cannot get it to work.

0 Likes
Message 8 of 19

bradeneuropeArthur
Mentor
Mentor

Dim CmdMan As ControlDefinition
Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("Command Name")
    
CmdMan.Execute
CmdMan.Execute2 (True) 

 

PartTriadApplyCmd
PartTriadCancelCmd
PartTriadOKCmd

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 9 of 19

Anonymous
Not applicable

@bradeneuropeArthurwrote:

Dim CmdMan As ControlDefinition
Set CmdMan = ThisApplication.CommandManager.ControlDefinitions.Item("Command Name")
    
CmdMan.Execute
CmdMan.Execute2 (True) 

 

PartTriadApplyCmd
PartTriadCancelCmd
PartTriadOKCmd

Thank you,

 

I am not that great yet with coding.

 

I'm pretty sure this will be the solution though.

 

When I use this code it throws the error: "Set is no longer supported." (Inventor 2018)

I also don't understand why "Part Triad" is referenced. Would you explain please?

0 Likes
Message 10 of 19

chandra.shekar.g
Autodesk Support
Autodesk Support

Hello @Anonymous,

 

Drawing file may not be modified without check out file.It goes against the purpose of having a check out system. If you are just simply able to bypass it at will without following whatever it is enforcing.

 

Local copy of vault file can be saved to some other location. So that, "FILE.DWG" is not checked out." "Do you want to check it out?"  prompt / dialog can be skipped. After printing drawing, file can be deleted.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes
Message 11 of 19

philip1009
Advisor
Advisor

What's your purpose for opening a drawing without checking it out?  The easiest solution is to suppress Check Out dialog in your Vault Options under the Vault Tab.

 

Unfortunately the api for Vault interactions in Inventor isn't exposed and can't be used in iLogic, the only exposed Vault api functions are for changing which Vault to use, etc.

 

The only function that could have worked is something like this:

 

SyntaxEditor Code Snippet

'Deactivate Inventor Dialogs
ThisApplication.SilentOperation=True

'Open Drawing ThisApplication.Documents.Open("<Full File Path and Name>")
'Reactivate Inventor Dialogs ThisApplication.SilentOperation=False

But I just tested this myself and it doesn't work.

 

The only way I know to avoid those dialogs without suppressing them is to have the latest files from the Vault and that all the files are updated in relation to each other i.e. the drawing is updated to show later changes to part/assembly.

 

If the purpose is some sort of Print Packet and/or PDF Export, there's plenty of help with that. 

0 Likes
Message 12 of 19

Anonymous
Not applicable

@philip1009wrote:

What's your purpose for opening a drawing without checking it out?  The easiest solution is to suppress Check Out dialog in your Vault Options under the Vault Tab.

 

Unfortunately the api for Vault interactions in Inventor isn't exposed and can't be used in iLogic, the only exposed Vault api functions are for changing which Vault to use, etc.

 

The only function that could have worked is something like this:

 

SyntaxEditor Code Snippet

'Deactivate Inventor Dialogs
ThisApplication.SilentOperation=True

'Open Drawing ThisApplication.Documents.Open("<Full File Path and Name>")
'Reactivate Inventor Dialogs ThisApplication.SilentOperation=False

But I just tested this myself and it doesn't work.

 

The only way I know to avoid those dialogs without suppressing them is to have the latest files from the Vault and that all the files are updated in relation to each other i.e. the drawing is updated to show later changes to part/assembly.

 

If the purpose is some sort of Print Packet and/or PDF Export, there's plenty of help with that. 


Thank you,

 

My end goal here is to make a plot stamp.

 

I want to "GET" not check out the file from Vault

- Run plot stamp iLogic

- iLogic places text on drawing (By changing an iProperty)

- print the drawing

- iLogic removes plot stamp (By clearing iProperty value)

0 Likes
Message 13 of 19

philip1009
Advisor
Advisor


Thank you,

 

My end goal here is to make a plot stamp.

 

I want to "GET" not check out the file from Vault

- Run plot stamp iLogic

- iLogic places text on drawing (By changing an iProperty)

- print the drawing

- iLogic removes plot stamp (By clearing iProperty value)


Okay, the workflow is possible, but since the main obstacle can't be controlled via iLogic, the only solutions to come up with is automatic Print/PDF Export upon closing/saving a drawing with the stamp rule so a post-process print isn't necessary.  Or suppress the dialog manually and having to remember to check-out drawings without a prompt or unsuppress the dialog after the print.

 

For my workflow, on certain drawings, whenever they're saved, I just have a pop-up asking me if I want to print or PDF export the drawing before I close and check it into the Vault.  The print portion is easy enough, but the PDF export can be a pain depending how you want your PDFs and what version of Windows you have.

 

If the automatic export on save is something that will work for you I can put a modified version of my code here.

0 Likes
Message 14 of 19

marcin_otręba
Advisor
Advisor
Accepted solution

maybe you could try :

 

ThisApplication.SilentOperation = True
 Dim vaultaddin As ApplicationAddIn
 Set vaultaddin = ThisApplication.ApplicationAddIns.ItemById("{48B682BC-42E6-4953-84C5-3D253B52E77B}")
vaultaddin.Deactivate
'do your code
Close Document
vaultaddin.Activate
ThisApplication.SilentOperation = False

 

silent operation is because you will get prompt that file is read only and do you want to edit it, silent operations should fix it, if nort you need to change fole property to readonly = false then open it and do magic...

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

Message 15 of 19

bradeneuropeArthur
Mentor
Mentor
Accepted solution
Open Drawing
ThisApplication.Documents.Openwithoptions(", , ")

Than you are able to open it easier and without links etc....

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 16 of 19

marcin_otręba
Advisor
Advisor

i check and i think takt open invisible with silentoperations will make it without prompt ass well

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes
Message 17 of 19

bradeneuropeArthur
Mentor
Mentor
That is true I think.

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 18 of 19

philip1009
Advisor
Advisor

The silent operation by itself didn't work but deactivating the add-in with silent operation solved it for me.  Now we'll need to figure out the best method of deactivating the add-in before the drawing is open since we don't want to deactivate the add-in every time the document is open in case it needs to be checked out and edited.

 

jwehmeier : Are you manually opening the drawings one at a time, or are you using another iLogic rule to iterate through every drawing in a folder or assembly and running the rule for each drawing?

0 Likes
Message 19 of 19

marcin_otręba
Advisor
Advisor

i'm pretty sure that it can be deactivated after opening the drawing...in some cases it will ask on opening to check out but you must decide.., or you can add button in your ilogic which will deactivate addin and run openfiledialog to choose file to open...

Hi, maybe you want to check my apps:


DrawingTools   View&ColoringTools   MRUFolders

0 Likes