Drawing Resources Help

Drawing Resources Help

Anonymous
Not applicable
734 Views
3 Replies
Message 1 of 4

Drawing Resources Help

Anonymous
Not applicable

Here's my problem:

 

I'm an intern at a company that uses Inventor 2011. One of my primary jobs is to update assemblies, presentations, and the corresponding prints. When updating the prints I need to update the drawing resources to reflect the newest print template. To do this I copy the Drawing Resources from the apporoved print and paste them into the Drawing Resources for the print I want changed. When I do this I need to click "Replace" then either click "OK" or hit enter. The problem is I need to do this 30-ish times for each print. I can't use the drawing resource manager because all the prints are cloud based on a central server located away from our facility, so I don't have complete access to all the prints. 

 

What I want:

 

I want a way to either write a program that would make those clicks for me (the window that pops up is the active window) or make a button that has the clicks and memorized so it will do it for me. I hope this is possible, because doing this manually is a pain.

 

Thanks for any help!

0 Likes
735 Views
3 Replies
Replies (3)
Message 2 of 4

Rene-J
Collaborator
Collaborator

Hi try Automatic update Drawing Resources

http://www.mcadforums.com/forums/viewtopic.php?f=34&t=8018

René J

Message 3 of 4

Anonymous
Not applicable

This is fantastic, but unfortunately it wants to create a new document when I update. I am using the manual update and when I push 'cancel' on the document creation I get an error.error.png

 

I posted this on your mcad forum, but since you replied so quickly to this I figured I'd try it out here as well.

 

Once again thanks for all your hard work 🙂

 

Chris

0 Likes
Message 4 of 4

philippe.leefsma
Alumni
Alumni

Hi,

 

First of all, did you try setting the Application.SilentOperation = true? This should let Inventor go with the default choice silently for each dialog being displayed. It might be a simple solution if it works.

 

Concerning your questions, the first one could be achieved but it will require a bit of programming skills, especially that it will involve relying on Win32 API: to get this done you may need two main things, the first is using a CBT Hook in order to hook into the dialog display mechnism. You can easily find .Net implementations of CBT Hooks over the web, the second would be to iterate through the controls displayed in that dialog and programmatically send a mouse click message to the OK button. Again finding how to do that can be easily found on the web, take a look at www.pinvoke.net/ if you are not familliar with it.

 

The second question "make a button that has the clicks and memorized" is not really doable if you don't deal with your custom controls.

 

Regards,

Philippe.

 

 

 

 



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

0 Likes