Pauses for user input of string value.
rhinoscriptsyntax.GetString (message=None, defaultString=None, strings=None)
rhinoscript.userinterface.GetString (message=None, defaultString=None, strings=None)
message |
Optional. String. A prompt or message. |
defaultString |
Optional. String. A default value. |
strings |
Optional. List. A list of strings to be displayed as click-able command options. Note, strings cannot begin with a numeric character. |
String |
The string either input or selected by the user if successful. If the user presses the Enter key without typing in a string, an empty string "" is returned. |
None |
If not successful, on error, or if the user pressed cancel. |
import rhinoscriptsyntax as rs
layer = rs.CurrentLayer()
layer = rs.GetString("Layer to set current", layer)
if layer: rs.CurrentLayer(layer)