Hallo, I´m trying to write a function in python that hides all layers in a detail but some and zoom the detail to extend in the remaining objects. Since I do not find any method in rhinoscriptsyntax and am not really fond of rhinocommand, I am trying using rs.Command(), unsuccesfully. What am I doing wrong?
def detailLayersVisibile(detail_id,layers):
# select detail
rs.UnselectAllObjects()
rs.SelectObject(detail_id)
rs.Command('-Detail Enable ', echo=False)
rs.UnselectAllObjects()#all layers in doc L_all = rs.LayerNames() #cycle through layers for layer in L_all: if not(layer in layers): commandHide = "_HideLayersInDetail Layers "+layer rs.Command(commandHide) return rs.ZoomExtents()
1 post - 1 participant