Looping through 'stacked' shapes

M

Mac

Hello all,
assume e.g. 20 shapes which are visually placed one on top of the other, so
that on your drawing page only the topmost shape is visible. Now, I want my
code to loop through all the shapes that are stacked there... I believe I
should be able to achieve this using their respective coordinates; is that
correct or is there a better way? Thank you.
 
M

Mac

What I mean is this - after one clicks on the topmost shape, the code goes
like this: obtain the current Selection object, store its x-y coords and then
iterate through all shapes on the drawing page which are located within the
same x-y cords but have different Index value ( visually this means - they
can't be seen as they are hidden "under" the topmost shape)...
 
D

Dieter Sternberg

Have a look at SpatialSearch with the flag visSpatialFrontToBack

Regards
Dieter
 
J

John... Visio MVP

Mac said:
Hello all,
assume e.g. 20 shapes which are visually placed one on top of the other,
so
that on your drawing page only the topmost shape is visible. Now, I want
my
code to loop through all the shapes that are stacked there... I believe I
should be able to achieve this using their respective coordinates; is that
correct or is there a better way? Thank you.


Can you give us more details of what you are trying to achieve?

SpatialNeighbors will let you know who is nearby. Z-order will tell you who
is in front, but is rhat what you really need? It is possible to create a
single shape, that depending on a custom property can alter its' appearance.
No code is required, it is all done within the shapesheet.

John... Visio MVP
 

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