Find and zoom in

J

Jim

Hi all,

I have a very large drawing (ANSI 'D') with over 500 custom objects I
created and 2000 standard objects. My custom objects use a dynamic connector
to connect them together. I run a VBA program to populate the custom
property fields of all custom objects and then create a flat text file
containing all of the connections.

Some times the user does not properly glue one end of the connector to an
object. I can detect that the connection is not correct, but I can not
visually see where it is on the drawing. Currently I populate the shape text
field with the text 'ERROR' in a 36 font so I can more easily find it.

Is there a way in VBA to center the drawing based on a shape in the
collection and then zoom in on it?

Jim
 
J

junethesecond

Yes, there is.
First, display a list of the all
shapes name on the page,
(or any other unique data.)
Second, user selects a name from
the list.
Third, center the shape and zoom.

For the first display, VBA userform
or custom property defined on the
page may be available.

For the third, ScrollViewTo method
and Zoom method are available.
 
J

junethesecond

The usage is as follows.
Unzip the downloaded file,
double-click the unzipped file,
SearchShape.vsd.
Visio2003 drawing is opened.
Locate mouse cursol on the
drawing page, press right hand
button of the mouse.
Select an item, "Search Shapes
by Name,...".
Userform will be displayed for search.
 

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