Refresh After using ScreenUpdating = false/true

Refresh After using ScreenUpdating = false/true

NSBowser
Advocate Advocate
780 Views
2 Replies
Message 1 of 3

Refresh After using ScreenUpdating = false/true

NSBowser
Advocate
Advocate

For performance, many people suggest disabling ScreenUpdating while your program is running to reduce the overhead of generating the graphics.

 

Sample Code:

// Initialize
_invApp.ScreenUpdating = false;

// Program Code Here

// Cleanup
_invApp.ScreenUpdating = true;

However, after the program has run, Inventor acts as if it needs a repaint. with changes to the browser not appearing, new document tabs not showing, etc.

 

I've read a few posts that dance around the topic, with the best suggestion appearing to be Minimize/Maximize the window after the program is done.

 

Has anyone else found a way to correct this, perhaps with some sort of repaint force or otherwise?

 

Thanks!


Best of Luck

---------------------------------------------------------------------------------------------------------------------------------
If you find this reply helpful or insightful, please use the 'Accept as Solution' or 'Kudos' button below.
0 Likes
781 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

try 

Application.ActiveView.Update();

0 Likes
Message 3 of 3

Raider_71
Collaborator
Collaborator

In my case, this is not helping and my browser items become unusable and overlapping to the point that I can't select anything in the browser. A minimize and restore also do not fix the issue.

 

Anyone else found a solution for this yet?

0 Likes