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: 

Inventor Crashing When Assembly is Placed

1 REPLY 1
Reply
Message 1 of 2
graeme.hogarth
373 Views, 1 Reply

Inventor Crashing When Assembly is Placed

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

 

1 REPLY 1
Message 2 of 2
YuhanZhang
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.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report