Displays a list of items in a list box dialog.
rhinoscriptsyntax.ListBox (items, message=None, title=None, default=None)
rhinoscript.userinterface.ListBox (items, message=None, title=None, default=None)
items |
Required. List. A list of items. |
message |
Optional. String. A prompt or message. |
title |
Optional. String. A dialog box title. |
default |
Optional. The default selected item |
String |
The selected item if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
layers = rs.LayerNames()
if layers:
result = rs.ListBox(layers, "Layer to set current")
if result: rs.CurrentLayer( result )