Visio zoom in-to shape not working always when shape sheet small.

D

deepumukundan

Hi,

I have a visio drawing for which the shape sheet is 340 inches while the
entire drawing consumes 1500 inches. (height 35 inches). Why 340 inches is
that if i give shape sheet with more than 340 i wont be getting a 100% zoom
with the drawing. So currently i can zoom upto 100%.The image has around 6200
shapes including the dynamic connectors.

The problem occurs when, using a custom macro, i select a shape object
within the entire image and try to zoom into it (something like a search).
Within a specific region from the shape sheet (both left and right) i dont
have any problem, but after this range my code doesnt seem to work.

Visio.Application.ActiveWindow.DeselectAll
Visio.Application.ActiveWindow.Zoom = 0.01 'Change zoom to lower value
Visio.Application.ActiveWindow.Select ActivePage.Shapes(MYSHAPENAME),
visDeselectAll + visSelect
Visio.Application.ActiveWindow.Zoom = 1.0 'Reset zoom so that shape gets to
center screen

any possible explanation for this effect? and any way i can overcome this
issue? please help me out.


NB: my findings are that : 1. zoom is inversely proportional to shape sheet
width of the page and 2. Search area is directly proportional to shape sheet
width of that page.
 
M

Mark Nelson [MS]

I'll try to dig up the technical explanation and post it on the blog. The
short answer is that Visio's display surface has a maximum number of pixels
it can show. Very large page sizes force Visio to restrict the amount of
zooming that can occur so that the entire display does not exceed the pixel
limit.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

deepumukundan

Hi Mark,

Thanks for your reply.
Actually i was experimenting a lot with the shape sheet and during a trial
and error,
i found out that when the shape sheet for the document is moved to the
extreme right of the drawing (after all my shapes are lying) and when its
dimensions are neutralised to 0,0 (height and width), i could get the
required effect i had requested.
i.e. i was able to pinpoint all my shapes with the code i posted.
The only limitation that i have now is that when a shape is selected,
sometimes the scroll bar for horizontal movement will be at its extreme left
so the end users may think that there is nothing to the left. But keeping the
arrow button for left scroll pressed will take them to view more shapes. This
is something they can be made aware of, so that all my problems are solved.

Thanks for sharing your views.
Regards,
-Deepu
 
M

Mark Nelson [MS]

Glad to hear that. BTW, I managed to find the details I was looking for.
Check out http://blogs.msdn.com/visio/default.aspx on Sep 12 for the
write-up.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

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

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