Improve Visio Drawing creation

D

David LACASSAGNE

I generate a Visio drawing from an Access Database by using
automation: all the drops and cells modification are made by VBA code
of the Access Database.

Althought I use the functions DropMany, SetFormulas, SetResults, the
creation remains slow.

I was wondering if it would be faster by using another approach:
1-Give all drop and cell values to the Visio document (by automation,
but all the values would be given in a single automation call)
2-Call a Sub of the Visio document that does the drops and cells
modifications from the previous values (so as it is a Visio process
that creates the document contents).

Is there a chance that this solution may be faster to create the
drawing?
Has anybody compared these two solutions?

Thanks in advance,

David.
 
G

Gary Shell

I haven't tried what you are suggesting, but I am struggling with the speed
(or lack thereof) with VISIO and my application. In my case I am using
VB.NET and the Interop OCX so I have another layer to contend with, but one
thing I found that made a HUGE difference was to turn off Visio's recalc
while I was adding shapes to the page and then turning it back on and
execute a DoEvents.

Also, in my case I am dealing with a Visio template which has code in it
(the Cross Functional Flowchart Template). It is the template code that
appears to be really slowing me down and turning recalc off limited its
interference.

Gary
 
M

Mark Nelson [MS]

Definitely make use of DeferRecalc and ShowChanges to keep Visio from doing
a bunch of work before you are done making your drawing.

Also if you have to create multiple page drawings, it is much faster to
insert all the pages at once and then go back and populate the pages with
shapes.

If you are adding any new rows to your shapes (such as User-defined cells or
Custom Properties), you should create a master shape that already has these
inserted. Dynamically creating new rows in the Shapesheet is costly.

It would be faster to have more code run in the same process as Visio. You
could try creating a COM Add-in for Visio that takes your raw data and does
the work of making a drawing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top