Hello, I want to make a code that gives a name or a mark to groups (or components) that are selected, so that I can then refer to this object from code without being selected at that time and then apply for example a transformation
t = Geom::Transformation.scaling 10 entity.transform!
for now the only thing I've accomplished is to name the group, but I do not believe this will serve for my purpose
modelo = Sketchup.active_model
if Sketchup.active_model.selection.empty?
UI.messagebox "seleccione un grupo o un componente"
return
end
i=0
entidades=[]
modelo.selection.each { |entity|
if entity.is_a?(Sketchup;;Group)||
entity.is_a?(Sketchup;;ComponentInstance)
i=i+1
entidades[i-1]=entity
entidades[i-1].make_unique
entidades[i-1].name = "Entidad #{i-1}"
end
}
I thought about using entityID
but do not quite understand how you could use this, besides not persistent between sessions.
(google translator)