GetBoolean

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

Syntax

Rhino.GetBoolean (strMessage, arrItems, arrDefaults)

Parameters

strMessage

Required.  String.  A prompt or message.

arrItems

Required.  Array.  An array of strings that describe the boolean items that will appear as command-line option toggles. Each boolean item consists of three strings.

Element

Description

0

A description of the boolean value.

1

A string identifying the False value.

2

A string identifying the True value.

arrDefaults

Required.  Array.  A array of boolean values to be used as default, or starting values.

Returns

Array

An array of boolean values that represent the boolean items, if successful.

Null

If not successful, or on error.

Example

Dim arrItems, arrDefaults, arrResults, blnVal

arrItems = Array( "Lights", "Off", "On", _

                  "Cameras", "Disabled", "Enabled", _

                  "Action", "False", "True" )

arrDefaults = array(True, True, True)

arrResults = Rhino.GetBoolean("Boolean options", arrItems, arrDefaults)

If IsArray(arrResults) Then

  For Each blnVal In arrResults

    Rhino.Print blnVal

  Next

End If

Also See

GetString