getLayers() problem on Mac

Hi,

I’m trying to run a script where I select multiple layers, using getLayers().

I’m sure I’ve used it in the past, and I tried getLayer() - singular - and that works, but getLayers() - plural - throws the following exception:

Message: ‘type’ object has no attribute ‘ShowSelectMultipleLayersDialog’

Traceback:
line 444, in GetLayers, “/Applications/Rhinoceros.app/Contents/Resources/ManagedPlugIns/RhinoDLR_Python.rhp/RssLib/rhinoscript/userinterface.py”
line 20, in , “/Users/peter/Library/Application Support/McNeel/Rhinoceros/Scripts/Output_to_MAX.py”

Any Ideas?

Cheers Peter

@Alain is this something you can look into? I’m not sure MacRhino has a multi-select layer dialog…

just faced this error, giving it a friendly bump :wink:

https://mcneel.myjetbrains.com/youtrack/issue/RH-37845

– Dale

I wrote this function that will return an array of however many layers you need to select.

def multiLayerSelect():
    numLayers = rs.GetInteger(message="How many layers?", number=2, minimum=1)
            j=0
            layers = []
            while j < numLayers:
                layers.append(rs.GetLayer(title="Select Layers"))
                j+=1
            return layers