How to duplicate selected polygon?

Hi,

I want to apply a series of operations on a selected poly on a grid (duplicate, translate, duplicate, scale, etc.).
I did it manualy on one poly then I copied the series of commands from the script window into a button that I want to use on my selection (one or a group of polys) The problem is that the script makes reference to the actual selected poly "poly[123]". How can I modify that script to work with the current selection?
In the script window I saw a poly[LAST]. I tried to use that like poly[LAST + 1]. The SRT commands work but the duplicate functions don't.

Any help appreciated. Or script examples.

Thanks.

hi 1d_,

to access the selection list try this:

Set sel = GetValue("SelectionList")
SelectObjectsFromAction sel
LogMessage(sel) ' lists selection
DuplicateMeshComponent sel, siPersistentOperation

now you can use sel instead of the Poly[LAST] thing

kE