Diagram not completely updated following changes via automation

A

Andy

I am updating dynamic connectors on my diagram via automation from VBA.
This can be changing the line colour/width/pattern etc of all the
connectors on the diagram. Very occasionally, not all the connectors
are updated. However, zooming out and back in again, the lines are show
correctly. Today this even happened for half a connector. It's as if
visio forgets that it was updating the screen. Has anyone seen anything
like this, is it possible for me to force a refresh.

Thanks
 
P

Paul Herber

I am updating dynamic connectors on my diagram via automation from VBA.
This can be changing the line colour/width/pattern etc of all the
connectors on the diagram. Very occasionally, not all the connectors
are updated. However, zooming out and back in again, the lines are show
correctly. Today this even happened for half a connector. It's as if
visio forgets that it was updating the screen. Has anyone seen anything
like this, is it possible for me to force a refresh.

I've seen this problem before, updating video drivers to the latest
version will help or reduce the hardware acceleration used by your
video card.
HTH
 
M

Mark Nelson [MS]

If you notice some wierd display behavior, press Ctrl+Alt+G to force Visio
to repaint the screen. If this solves the problem, the issue is likely
Visio's. If you still see the wierd behavior, the issue is likely external
to Visio.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Andy

I had this happen again. After doing Ctrl+Alt+G, Visio correctly
refreshed the screen. In this case the connectors that weren't
correctly drawn were under a user form. A command is chosen on the user
form which causes the user form to be hidden and the line style
changed. So maybe visio is not correctly redrawing when the user form
disappears. There must be some timing issue as after many attempts I
could not repeat it again.
 
M

Mark Nelson [MS]

Are you possibly using the ScreenUpdating property to control when updates
are displayed?

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
M

Mark Nelson [MS]

Keeping the screen properly refreshed without doing excessive refreshes
(which kill performance) is a complicated process. You may be encountering
a bug where the screen is stale momentarily.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Andy

So are you suggesting that turning off screen updating whilst i make
the changes and turning it back on after may improve things. Although I
guess the changes and the removal of the userform are somewhat
asynchronous, so I'm not sure if it would make a difference. I'm trying
to avoid doing an unnecessary refresh as most of the time it works
fine. Just when its being demo'd to customers that it sometime goes
wrong, timing is wonderful!,
 
A

Andy

This affect seems to be related to the performance of the machine. If
this is tried on an 2G Athlon the problem occurs more often, especially
is something like music is being played. When the priority of Visio was
increased, the display appeared to refresh correctly with an audible
gap in the music. It appears that if Visio is interrupted in some way
it does not complete the refresh. Panning about the diagram did not
correct this.
 

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