GetString

Pauses for user input of string value.

Syntax

rhinoscriptsyntax.GetString (message=None, defaultString=None, strings=None)

rhinoscript.userinterface.GetString (message=None, defaultString=None, strings=None)

Parameters

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.

Returns

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.

Example

import rhinoscriptsyntax as rs

layer = rs.CurrentLayer()

layer = rs.GetString("Layer to set current", layer)

if layer: rs.CurrentLayer(layer)

Also See

GetBoolean

StringBox