Changes to drawing are very slow

Started by llmmnnoo2002, July 24, 2008, 09:15:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

llmmnnoo2002

Hello,

I am writing a C# Visio COM-AddIn for visio 2007 using Visual Studio 2005.
Some of the drawings I work with have several hundred shapes and about a thousand connectors.
Although none of the code in the AddIn is running when moving or adding shapes, these actions are taking a lot of time to complete (sometimes more than a minute). The very same actions are finished within a second if the AddIn is uninstalled or the "Enable automation Event" in Tools->Options->Advanced is unchecked (but then the none of the AddIn functionality is operative).

I'm confused: as far as I know the AddIn code is not running at all, but it seems that it is still somehow having an effect (I'm assuming it's the AddIn's fault since everything works fine if the AddIn is uninstalled).

I have noticed that the most time consuming actions are usually involved with connectors, i.e. moving a shape which is connected to another shape or placing a shape on connectors is very slow, while moving an unconnected shape without "touching" connectors is done quickly. Is it the redrawing of connectors which is taking all that time ? what does it have to do with the AddIn ?

Thanks.


Paul Herber

Is the addon referenced in any of the shapes' cells, i.e. actions, events or glue?

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

llmmnnoo2002

If I understood your question correctly then yes: the AddIn is referenced in the visSectionAction of all the shapes, but not in the shape's events. The rows in the visSectionAction section have their visActionAction cell filled with the value: RUNADDONWARGS(..."QUEUEMARKEREVENT"...) so the user can right click a shape and raise the QUEUEMARKEREVENT in the code in order to perform certain functionality.