Current view shape selection

A

Andy

I'm trying to select all the shapes that are visible in the current
view of the visio window. Using visio.activewindow.selectall, just
selects all the shapes on the page.

I can get the bounding box for the windows current view, but am looking
for a method to select all the shapes within the bounding box. Am I
stuck with having to process all the shapes on the page and checking if
the coordinates are within the bounding box?

Thanks
 
C

Chris Roth [MVP]

Hi Andy,

Have a look in the Developer's Reference for SpatialNeighbors and
SpatialRelations.

You might have to draw a rectangle that exactly matches the window, then get
the set of shapes that are ContainedIn that box (and then delete the
rectangle)

I can't remember off-hand if you can do this without drawing the temporary
rectangle...

--
Hope this helps,

Chris Roth
Visio MVP

Free Visio shapes:
http://www.visguy.com/category/shapes
Visio programming info:
http://www.visguy.com/category/programming/
Other Visio resources:
http://www.visguy.com/visio-links/
 

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