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: 

Forcing Redraw / View Update

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1803 Views, 3 Replies

Forcing Redraw / View Update

Hi,

 

my Addin changes the coordinate systems of some occurrences in a while(running) - loop. After each iteration, i want to update the 3D-View in Inventor to show the calculated changes. For this, i call the Update Method of the current View (ActiveView property of Application).

 

Unfortunately, the redraw does not happen unless i keep moving the mouse over the window. Is there another method / way to achieve the desired result (forced redrawing for smooth animations)? The Update method of the Document does not seem to work, either.

 

Using Inventor2011 64 Bit on Win7 (64Bit)

 

Gregor

3 REPLIES 3
Message 2 of 4
MjDeck
in reply to: Anonymous

Did you try calling both the Document.Update and the ActiveView.Update, in that order?

In Inventor 2010 and above, you could also call

Application.UserInterfaceManager.DoEvents

after the view update.


Mike Deck
Software Developer
Autodesk, Inc.

Message 3 of 4
Anonymous
in reply to: MjDeck

 


@MjDeck wrote:

Did you try calling both the Document.Update and the ActiveView.Update, in that order?


No, i just tried ActiveView.Update and then Document.Update, but that did not work.

 


However, i found a solution that works fine:

Don't use a while(true)-style loop for these things. Use a Timer set to a reasonable interval that triggers a single step (Matrix/Transformation change + ActiveView.Update). I set the interval to 40ms so i have a nice smooth 25fps animation.

Message 4 of 4
Explorer__Amos
in reply to: Anonymous

How do you set the position of the occurrences? when I call SetTransformWithoutConstraints, it will update the activedocument so that my cusor is busy

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

Post to forums  

Autodesk Design & Make Report