Thread: shaperange.add
View Single Post
Old 28-06-2011, 12:49
Posts: n/a

I tried your suggestion to use .next . I found it interesting and it actually allowed me to have 2 shapes in the shaperange instead of 1. But, sadly, it wasn't enough.

Two problems: 1. .next was picking up a text shape that was on the page instead of the duplicated shape. It actually goes down the list of shapes rather than up (which is where the dups are) so that it picks the next shape behind the shape I am duplicating.
2. It only picks up 1 shape during the loop rather than 1 for every iteration. So I only get 2 shapes in my range rather than all the dups. I was having that same problem before with .add except that I only got 1 shape in the range.

I think somehow I need to be able to reference each dup after the fact, rather than sr.add s1.duplicate. I just don't know how to do that.

The duplication loop is working like I wanted. It makes duplicates of the selected shape and fits as many as can fit in the given space, based on the size of the selected shape. The next step is to do the same thing vertically, but I need all the shapes selected and grouped so I can duplicate downward. That's where it fails as I only have the original (or maybe the last dup) selected.

I'll keep trying till something breaks.

Thanks John
Reply With Quote