Selected Layers

Hi…

How do I can get a list of selected layers?

thx…

The Rhino SDK does not expose a method to retrieve the layers that are selected in the Layers panel. There is already a standing wish for this:

http://mcneel.myjetbrains.com/youtrack/issue/RH-21517

Just curious, why do you need to know what layers are selected?

Hi Dale,

I’m developing a plugin for a shoe company, the application uses a database size and creates all sizes from a few mathematical calculations, the end user asked me to select a layer to move all sizes resulting in the selected layer.

Sorry for my English, I’m Spanish.

Something like the command:
ChangeToCurrentLayer

Hi David,

What programming language are you developing in? The Rhino SDK has functions for selecting layers…

– Dale

the end user asked me the option to multiselect in layers, not necessarily going to work with a layer … thanks for the tip

use c #, which features selection are those, dale?

If you want to select a layer, use:

Rhino.UI.Dialogs.ShowSelectLayerDialog()

If you want to select more than one layer, use:

Rhino.UI.Dialogs.ShowSelectMultipleLayersDialog()