I have a number of macros which make visual changes to entities (such as altering colours, fonts etc, adding Alternate Keys which are displayed, etc) and take far-too-long to run. However, debug statements show that the actual workings of the macro are quite quick, but the screen refresh at the end is what is taking all the time.
For some macros I wrap the macro code in the following, and some I don't. It doesn't make much difference either way. When I do not wrap the code, the macro shows lots of screen flashing/flickering while it is running. But disabling screen update does not make it any faster.
Is there something I am missing to improve the speed?
Try this instead:
DiagramManager.EnableScreenUpdateEx(False, True) ' Turn off screen update
DiagramManager.EnableScreenUpdateEx(True, True) ' Turn on screen update
Brilliant, thanks! That makes a huge difference. :-)
Powered by IDERA