I've written a program that prints the drawings from an assembly. For this print to work, I have to have the drawing open (I've tried printing using the option Set doc = ThisApplication.Documents.Open(DWGName, False) but the print manager will just skip over a file that isn't open.
When I change the code to "True" Inventor wants to know if i want to check out the drawing from vault and this requires user input. Is there a way i can bypass this user input or automate an answer so the user doesn't have to constantly be clicking when batching drawings?
Solved! Go to Solution.
Solved by CAD-e-Shack. Go to Solution.
The only way to bypass native dialogs is to set
Application.SilentOperation = True
The default choices proposed by each dialog is automatically selected, but you have no way to specify a different choice if needed.
Don't forget to set it back to False once you are done, otherwise the user won't see any more dialog.
I hope it helps.
Regards,
Philippe.
I had actually been using that, but because Inventor is calling files from Vault the "silent operation" code no longer holds. The only way I've found thus far (and may be the only way) is I've inserted this line just after opening a file:
prompt = kDontAllowButton3NoMoreThisSession
Which supresses the Vault popup for the rest of the inventor session. It's not perfect but it does the trick.
Thanks for the reply though
Can't find what you're looking for? Ask the community or share your knowledge.