GetBoolean

Pauses for user input of one or more boolean values. Boolean values are displayed as click-able command-line option toggles.

Syntax

rhinoscriptsyntax.GetBoolean (message, items, defaults)

rhinoscript.userinterface.GetBoolean (message, items, defaults)

Parameters

message

Required.  String.  A prompt or message.

items

Required.  List or Tuple.  Strings that describe the boolean items that will appear as command-line option toggles. Each boolean item is a tuple of three strings.

Element

Description

0

A description of the boolean value.  Must only consist of letters and numbers. (no characters like space, period, or dash

1

A string identifying the False value.

2

A string identifying the True value.

defaults

Required.  List or tuple.  Boolean values to be used as default, or starting values.

Returns

List

A list of boolean values that represent the boolean items, if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

items = ("Lights", "Off", "On"), ("Cameras", "Disabled", "Enabled"), ("Action", "False", "True")

results = rs.GetBoolean("Boolean options", items, (True, True, True) )

if results:

    for val in results: print val

Also See

GetString