Visio DrawingControl speed

A

andrewLLL

Hi all

I found something interesting about Visio drawing Control
and wonder if anybobody can tell the reason.

If you have VB (or any other similar) installed, please
follow this:
(1) open Visio and start a blank drawing, draw a rectanglar
shape, then format filling to color = 00, pattern = 26,
pattern color = 01. This will give you something like a 3-D
vessel.
(2) copy this shape to maybe 20 or more. Then you can
change the text for each "vessel". It is VERY FAST. Save
the drawing to a file, say C:\test.vsd
(3) start a new VB project. Add Visio 11.0 drawing control
to the project components list. Now you drag the visio
control to form1. Resize the form and control to make it big.
(4) on Form1_Load event, just type one line:
drawingControl1.src = "C:\test.vsd"
(5) Run the VB project and you see the Drawing on the
window. Now if you change text for each "Vessel", it
becomes VERY SLOW.

Anybody can explain why and give a solution to speed it up?
Or is it a bug in the drawing control? Thanks.

Andrew
 
J

junethesecond

I've followed your instruction.
My PC is not so strong, but speed seems not down.
(Memory 256MB, CPU 1.7GHz)
 
A

andrewLLL

Hi June

Thanks for testing. Can you try making more copies of the
3-D vessel, lets say 50 "vessels" on the page, and trying
renaming the vessels again on the embeded Visio drawing
control and see if it is still fast? My computer isn't
worst than yours but when I type names (I did sth crazy
though like pressing my hand on the keyboard) for each
vessel it was really sluggish.

Andrew
 
C

Chris Roth [ Visio MVP ]

I believe that there's a "known issue" that says graduated fills can
significantly hamper the performance of the Visio control. I read it
somewhere, but can't remember exactly what or where.

I haven't noticed any problems personaly. Might also help to investigate
app.DeferRecalc, ScreenUpdating etc. You can turn off various application
properties while your code is drawing to stop Visio from trying to
calculate/render a state after every operation.

--

Hope this helps,

Chris Roth
Visio MVP
 
A

andrewLLL

I tried the things like DeferRecalc, ScreenUpdating,
showchanges, etc. None of them worked.

The thing is, during typing of a new name for a graduated
shape, not a single event is fired so this got to be a bug
with Visio 2003 drawing control?


Andrew
 

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