I appreciate very much the possibility to zoom in and center the view on the selected shape by using the scroll wheel. (Centering on the current position of the mouse pointer, as CAD tools do, would be better, but the prior selection of a shape is not a big hurdle).
If you happen to have groups with sub-shapes much bigger than the container itself, Visio will center the zoom on the center of the sub-shapes extents.
Is there a way to get the center on the dimensions of the group?
----
added a vsd to illustrate, in case my explanation is not clear enough
When my drawing is complicated, and when I wish to center zoom at the point,
I used to place a small circle near the point, select the circle and turn the mouse wheel.
Center zoom at the mouse cursol is expected for all users. :) :) :) :) :)
That is also what I do (with a rectangle), but I don't like it.
I don't like, either. ;) ;) ;) ;)
could also do this
- set your shapes so that double click does the docmd to open a new window
- select the shape of interest
- double click
Thank you Vojo,
but it's about (fast) navigating in the drawing, not so much about selecting. The alternative would rather be to utilize the navigation window. I've seen some colleagues who prefer this tool.
My another attempt is using mouse event and ScrolViewTo method in VBA.
0. Download and open attached drawing, and enable VBA macro.
1. Right click on the page and select menu Start Center Zoom
2. Press mouse wheel till wheel mark appears.
3. Wait for view scrolling to the center.
4. Turn mouse wheel to zoom.
.
.
.
X. Right click on the page and select End Center Zoom.
Very nice idea Junichi, it worked fine.
However, playing with your solution I made a discovery that seems to be an ever easier workaround. When the center on zoom and the zoom on scroll are set off (that's what your macro did), you can zoom on the position of your mouse if you press the ctrl-key at the same time.
cheers
Exactly, Yacine.
I've revised and attached it.
Now you can center on mouse cursol position without pressing mouse wheel.
Thank you Yacine. :) :) :) :) :) :) :)
This last one however does not work: "System Error &H80004005 (-2147467259) unknown error " (Vista32 + Visio 2007).
... and a question: when your macro is running can I still start other macros?
I am sorry. Here is Rev2.
This drawing includes only next code, and not includes mouse events.
And then, I think, you can run other macro.
Sub startCenterZoom()
Application.Settings.ZoomOnRoll = True
Application.Settings.CenterSelectionOnZoom = False
End Sub
Sub endCenterZoom()
Application.Settings.ZoomOnRoll = False
Application.Settings.CenterSelectionOnZoom = False
End Sub
It's perfect now. Thank you.