How To Update ClientGraphics Efficiently

How To Update ClientGraphics Efficiently

Anonymous
Not applicable
606 Views
1 Reply
Message 1 of 2

How To Update ClientGraphics Efficiently

Anonymous
Not applicable

I've implemented the ability to select and drag client graphics around, however I seem to have to call PartDocument.Update for changes to take effect even if I am simply setting a translation on a node.

 

The result is a really choppy movement as PartDocument.Update gets called every time a mouse movement is registered.

 

Is there a more efficient way to update the ClientGraphics node without calling an update on the whole part document?

 

Thanks

-Dean

0 Likes
Accepted solutions (1)
607 Views
1 Reply
Reply (1)
Message 2 of 2

ekinsb
Alumni
Alumni
Accepted solution

The fastest client graphics are those you access through the InteractionEvents.InteractionGraphics property.  These aren't transacted and don't participate in undo so they have the least overhead.  For regular client graphics you can cause them to update by calling the View.Update method.  Typically this will be by using Application.ActiveView.Update.  This should be much faster than calling Document.Update.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog