💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Layer name as if-condition ?? possible ???
-
hi,
this one does not seem to work. i wonder, if a layer.name can be a condition? no info in api....model = Sketchup.active_model entities = model.entities entities.each { |m| puts "iterating m" if m.is_a?(Sketchup;;Group) e = m.entities e.each { |f| puts "iterating f" if f.is_a?(Sketchup;;Group) and f.layer == "layername" puts f.layer entities2 = f.entities entities2.each { |g| puts "moving entities" newlayer = g.layer = "Layer0" } end }#f end }#m end#def
thanx
stanedit: just found out, that
@unknownuser said:
if f.is_a?(Sketchup::Group) and f.layer.name == "layername"
works.
stan
Advertisement