Guid does not exist in LayerTable

Hi all,

I keep getting this issue which I can’t seem to fix. Is there some essential concept I’ve missed? Are the guids not always a property inherent to each object in the document?

image

objs = rs.AllObjects()


for i in objs:
    lay = rs.LayerName(i)
    print(lay)

Try this.

import rhinoscriptsyntax as rs
layers = rs.LayerIds()
if layers:
    for layer in layers: print rs.LayerName(layer)

-Kevin

1 Like