Shapes that are member of a layer

A

Arnaud Maes

Hello

I am trying to get the collection of shapes that are members of a layer, or to decide whether a given shape appears in a specific layer

The layer object has Add and Remove methods, but no Shapes or Members or IsMember properties

Any idea

Thanks

A.M.
 
A

Al Edlund

The challange is that when looking at layers and shapes the indices are
different, i.e. layer 1 in the page collection may not be the same as layer
1 in the shape collection. Typically I end up searching each of the shapes
and then comparing the 'name' of the included layer against layers on the
page. Something like this

for each layer on page
for each shape on page
for each layer in the shape
do we have a match
next shape layer
next shape
next page layer

Al
Arnaud Maes said:
Hello,

I am trying to get the collection of shapes that are members of a layer,
or to decide whether a given shape appears in a specific layer.
 
A

Arnaud Maes

Thanks. My problem was that I missed the Shape.LayerCount and Shape.Layer(index) properties but was expecting a Shape.Layers collection. Thus, I couldn't script something as "for each layer in the shape" although it suffices to use a for i=1 to Shape.LayerCount. D'Oh

Things are now much clearer. Thanks for your help

A.M.
 

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