Inventor Customization

Inventor Customization

Reply
Member
graeme.hogarth
Posts: 5
Registered: ‎03-29-2011
Message 1 of 2 (184 Views)

Inventor Crashing When Assembly is Placed

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

Hi everyone,

 

I'm working on some vb.net 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 vb.net 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 vb.net 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.

 

Thanks

 

Employee
yuhanzhang
Posts: 434
Registered: ‎01-06-2009
Message 2 of 2 (177 Views)

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.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.