Dropped shape partly drawn in wrong position

A

Andy

I'm using automation to remove a shape from my diagram and then add a
new shape in its place. Very occasionally, when the new shapes is
dropped on the page (using the drop method via VBA), a part of the
shape is drawn in the wrong position. It appears as if a part of the
shape has been drawn using its position in the master shape, so appears
at the bottom left corner of the page. A visio refresh Ctrl-Alt-G
causes it to be redrawn correctly.

This is using Visio 2003 with all the service packs applied
 
J

JuneTheSecond

I've not experienced the case that you have.
But Drop method happens not accurate in a very special case.
Recommendation is to set PinX and PinY of new shape as same as old shape.
BTW, I don't know "A visio refresh Ctrl-Alt-G". Could you explain what it is?
 
A

Andy

I do set the pinX and pinY of the new shape to that of the old shape.
But its only part of the shape thats drawn in the wrong place, not the
entire shape.

I was given Ctrl-Alt-G as a means for Visio to redraw (by a MS
developer) and told if it is all correct after doing that then it may
be a bug.
 
J

JuneTheSecond

I cannot understand about "Ctrl-Alt-G as a means for Visio to redraw".
Would you show us more detail?
 
M

Mark Nelson [MS]

Ctrl-Alt-G is the keyboard shortcut for Visio's page renderer. It causes
all the cached information in the current page display to be re-rendered.
This is an internal command, but it is left exposed to users to help
diagnose rendering problems. If you notice a discrepancy in your drawing
and Ctrl-Alt-G clears it up, then you have most likely encountered a
rendering bug.

We'd love to get reproduction steps from you. Due to the nature of
rendering errors the repro steps must be very precise.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

JuneTheSecond

Thank you so much, Mark.
I made thousand of shapes and pressed "Ctrl-Alt-G",
and saw Visio redrawing the shapes as same as the redraw sometimes Visio did.
 
A

Andy

Its difficult to give a set of steps that will reproduce this problem
as it occurs infrequently, although if the application is being
demonstrated to a potential customer that makes it more likely to
happen, well software for you!

I have an electrical network diagram, with a shape representing say a
circuit breaker. The user selects the shape and causes a user form to
be displayed with a set of allowable operations on the breaker. An
operation is chosen and this is written to an excel spreadsheet. Excel
performs a calculation and this event is picked up by the application
which then chooses a new symbol to represent the operated breaker. This
shape is dropped on the diagram, its pin positions etc are copied from
the old shape which is then deleted. It is a grouped shape and very
occasionaly a part of this shape, e.g. a line does not appear where the
shape is. Looking down at the bottom left corner of the diagram, you
can then find the missing part of the shape. Ctrl-Alt-G causes it to be
drawn correctly. Repeating the same steps a considerable number of
times and it works flawlessly.
 

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