Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Print drawing from file

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
CAD-e-Shack
600 Views, 2 Replies

Print drawing from file

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?

2 REPLIES 2
Message 2 of 3

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.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 3

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.

Post to forums  

Autodesk Design & Make Report