SketchUp API
ShaDe documentation
Enter the code in the box:
# Method that returns true if the constraint is satisfied by the design, and false otherwise
def satisfied?
result = true
current_shape = DG2D.project.execution.current_shape if current_shape.p["Layer0"].get_node(Label.new("Red")) result = false end
return result
end