occurences.Add "bug" ( C# and a possible solution? )

occurences.Add "bug" ( C# and a possible solution? )

Anonymous
Not applicable
363 Views
1 Reply
Message 1 of 2

occurences.Add "bug" ( C# and a possible solution? )

Anonymous
Not applicable

Hi..

 

(Inventor 2010, Visual Studio Express 2010 C#, XP64, stand-alone app )

 

I´m trying to load a sequence of occurrences into an assembly in the same method call.

 

Unfortunately this causes Inventor to crash when reaching the second occurrence.

 

Inserting a Thread.Sleep(1000) between each ComponentDefinition.Occurrences.Add call, prevents the crash, giving Inventor time to do it´s job, but this hack is a rather dull solution...

 

Is there any event or property telling me when Inventor is ready for the next occurrence, and how would I implement this in the code..

 

Thanks in advance 😉

0 Likes
364 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Sorry.. My bad..

 

casting to an AssemblyComponentDefinition did the job. ( just like in the help file, UPPS )..

 

 

0 Likes