If statement to delete a layer

Hello Guys,

how to use if statement to delete other layers except for the “Default” one.

In python you would do it like so:

import rhinoscriptsyntax as rs

layerNames = rs.LayerNames()
for layer in layerNames:
    if layer != "Default":
1 Like

thanx mate… it’s gonna help