PromptForBool Method (ICommandMessage) Send Feedback
See Also 
Result[out]
True if the prompt appears in the command window, false if not
Prompt
Text of prompt
StringForTrue
Text that indicates to return true (see Remarks)
StringForFalse
Text that indicates to return false (see Remarks)
DefaultValue
Default value
Value[out]
Boolean value
Displays the specified prompt and default Boolean value in the command window and gets the Boolean input by the user.

Syntax

Visual Basic 
Function PromptForBool( _
   ByVal Prompt As System.String, _
   ByVal StringForTrue As System.String, _
   ByVal StringForFalse As System.String, _
   ByVal DefaultValue As System.Boolean, _
   ByRef Value As System.Boolean _
) As System.Boolean
C# 
System.bool PromptForBool( 
   System.string Prompt,
   System.string StringForTrue,
   System.string StringForFalse,
   System.bool DefaultValue,
   out System.bool Value
)
JavaScript 
PromptForBool( 
   Prompt : String,
   StringForTrue : String,
   StringForFalse : String,
   DefaultValue : Boolean
) : {
   Value : Boolean,
   Result : Boolean
}
COM native C++ 
HRESULT PromptForBool( 
   BSTR Prompt,
   BSTR StringForTrue,
   BSTR StringForFalse,
   VARIANT_BOOL DefaultValue,
   VARIANT_BOOL* Value,
   VARIANT_BOOL* Result
) 
C++ 
DSRESULT PromptForBool( 
   const dsString& Prompt,
   const dsString& StringForTrue,
   const dsString& StringForFalse,
   bool DefaultValue,
   bool* Value,
   bool* Result
) 

Parameters

Prompt
Text of prompt
StringForTrue
Text that indicates to return true (see Remarks)
StringForFalse
Text that indicates to return false (see Remarks)
DefaultValue
Default value
Value[out]
Boolean value
Result[out] or Return Value
True if the prompt appears in the command window, false if not

Remarks

StringForTrue and StringForFalse:

  • can contain any combination of numbers, letters, and hyphens or only numbers, only letters, or only hyphens.
  • cannot contain spaces or any other special characters or symbols.
 

See Also

Availability

DraftSight V1R1.1