💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Component instance name. req help
-
I'm using
Sketchup.active_model.active_entities.add_instance(my_component, t) # my_component is component name and # t is applied transformation
Sketchup appends #+number to component's name, for each instance. I want to be able to replace # in name with other character ('/'). Is there a way to do this?
-
The Component name is a String.
ins = entities.add_instance(cdef, transf) name = ins.name name.gsub!(/#/, '/') ins.name = name
-
I will add that the Definition name is different than the Instance name, but should work the same.
ins = entities.add_instance(cdef, transf) name = ins.definition.name name.gsub!(/#/, '/') ins.definition.name = name
Advertisement