Sketchup Ruby API - Create a component from selection or Array

Much appreciated Dan!

I do tend to make things complex and I may need to revisit the methodology on this one.
But as to getting a method to create a dumb component you have brought me to this, which serves the current purposes.

def self.regroup
  model = Sketchup.active_model
  active = []
  ents = model.active_entities
  model.active_entities.each {|e| active << e}
  grp = ents.add_group(active)
  inst = grp.to_component
end
1 Like