Inventor Customization

Inventor Customization

5 Posts
0 Kudos
Registered: ‎03-29-2011
Post 1 of 2

Inventor Crashing When Assembly is Placed

195 Views, 1 Replies
04-12-2012 01:53 AM

Hi everyone,


I'm working on some code which updates the sizes of parts within sub assemblies and then selects the correct sub assemblies to place and constrain into a larger assembly.


When I run my software all the sub-assemblies should open, resize and then get placed into the larger assembly.


This code works up to a point. However I'm having some trouble when one of my sub assemblies is placed and constrained into the larger assembly - Inventor crashes.


If I step through my code line by line, it works fine. I think that this is because Inventor has more 'time to think' about what it is doing between placing the sub assembly and constraining it (updating the parts i guess).


After discovering this I wrote a line in my code which uses the stopwatch class to wait 20 seconds between installing the part and constraining it, this allows everything to work without Inventor crashing.


What I'd like to know is if there is a command i could use in which would allow me to wait for the sub-assembly to be ready to be constrained rather than waiting 20 seconds? Although this works I don't think it's the 'correct' method of doing things.


I'm using Inventor 2011 SP1.


Any advice would be appreciated.




488 Posts
35 Kudos
Registered: ‎01-06-2009
Post 2 of 2

Re: Inventor Crashing When Assembly is Placed

04-12-2012 07:36 PM in reply to: graeme.hogarth

How about calling the UserInterfaceManager.DoEvents just after you place a sub-assembly instead of using stopwatch?


Please let me know if it works for you.

Rocky Zhang
Inventor API
Manufacturing Solutions
Autodesk, Inc.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!