getLayers() problem on Mac


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’

line 444, in GetLayers, “/Applications/”
line 20, in , “/Users/peter/Library/Application Support/McNeel/Rhinoceros/Scripts/”

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:

– 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)
            layers = []
            while j < numLayers:
                layers.append(rs.GetLayer(title="Select Layers"))
            return layers