• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    Autodesk Inventor Customization

    Reply
    New Member
    Posts: 2
    Registered: ‎08-08-2012

    Drawing Resources Help

    115 Views, 3 Replies
    08-08-2012 07:42 AM

    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!

    Please use plain text.
    Distinguished Contributor
    Posts: 300
    Registered: ‎05-07-2005

    Re: Drawing Resources Help

    08-08-2012 02:08 PM in reply to: CFol

    Hi try Automatic update Drawing Resources

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

    René J

    Please use plain text.
    New Member
    Posts: 2
    Registered: ‎08-08-2012

    Re: Drawing Resources Help

    08-09-2012 09:06 AM in reply to: Rene-J

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

     

    Chris

    Please use plain text.
    ADN Support Specialist
    Posts: 201
    Registered: ‎06-02-2009

    Re: Drawing Resources Help

    08-16-2012 01:28 AM in reply to: CFol

    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

    Please use plain text.