Copy method on selected dynamic components

Hello, I read the documentations for Selection, Group, and ComponentInstance.
But I can find the copy method only in Group class.
It must be that I’m missing something.

How can I make a copy of selections which are dynamic components?

are you asking for Ruby code or the dynamic component copy attribute?
presumably a dynamic component is a component instance, so the add_instance() method for a component would apply…

The add_instance method adds a component instance to the collection of entities.


With the selection active:


… they will be on the clipboard. Then …


… the copies will now be attached to the mouse. Click somewhere.


Thank you. Your answer was more suitable for my situation.