Error in rs.AddLayer

I had to change the file layer.py in order to add a layer by rs.AddLayer:

the line import Rhino seems to be missing

rs.AddLayer is still broken in WIP (8.0.23080.12305, 2023-03-21):

File “C:\Users\axelj.rhinocode\python3.9-28\site-rhinopython\rhinoscript\layer.py”, line 58, in AddLayer
layer = Rhino.DocObjects.Layer.GetDefaultLayerProperties()
NameError: name ‘Rhino’ is not defined

The fix that user bar proposed above was undone with the latest WIP today.

Thank you

@eirannejad Has this been logged? It took me a minute to figure out what was going on coming from V7.

RH-73563 RhinoCode: rs.AddLayer fails

It’s listed as fixed in the latest WIP.