Add an array of entities into an existing group

you can create a group with entities as you already have done, create an instance of that group in the target drawing context (using Entities#add_instance) and then explode that instance. This is currently the only way to move/copy entities between drawing contexts using Ruby, not counting parsing and generating the geometry anew.

Beware that add_group called with an Array of entity objects doesn’t work when not in the active drawing context.

EDIT: Issue with add_group in inactive drawing context: Entities#add_group with arguments not working when not used in the active drawing context · Issue #42 · SketchUp/api-issue-tracker · GitHub

2 Likes