PromptForBoolOrKeyword Method (ICommandMessage) Send Feedback
See Also 
Result[out]
Result as defined in dsPromptResultType_e
Prompt[out]
Text to display as the prompt in the command window
ErrorMsg
Error message to display in the command window when the user input is invalid
GlobalKeywordStrArray
Array of global keywords, which are typically language independent (see Remarks)
LocalKeywordStrArray
Array of local keywords to display in the command window, which are typically translated to the local language (see Remarks)
PromptInit
Prompt initialization as defined in dsPromptInit_e (see Remarks)
StringForTrue
Text that indicates to return true (see Remarks)
StringForFalse
Text that indicates to return false (see Remarks)
DefaultValue
Default Boolean value to display in the prompt in the command window (see Remarks)
Keyword[out]
Keyword input by the user
Value[out]
Boolean value input by the user
Displays the specified prompt, local keywords, and default value for the Boolean in the command window and gets the user's input.

Syntax

Visual Basic 
Function PromptForBoolOrKeyword( _
   ByVal Prompt As System.String, _
   ByVal ErrorMsg As System.String, _
   ByVal GlobalKeywordStrArray As System.Object, _
   ByVal LocalKeywordStrArray As System.Object, _
   ByVal PromptInit As System.Integer, _
   ByVal StringForTrue As System.String, _
   ByVal StringForFalse As System.String, _
   ByVal DefaultValue As System.Boolean, _
   ByRef Keyword As System.String, _
   ByRef Value As System.Boolean _
) As dsPromptResultType_e
C# 
dsPromptResultType_e PromptForBoolOrKeyword( 
   System.string Prompt,
   System.string ErrorMsg,
   System.object GlobalKeywordStrArray,
   System.object LocalKeywordStrArray,
   System.int PromptInit,
   System.string StringForTrue,
   System.string StringForFalse,
   System.bool DefaultValue,
   out System.string Keyword,
   out System.bool Value
)
JavaScript 
PromptForBoolOrKeyword( 
   Prompt : String,
   ErrorMsg : String,
   GlobalKeywordStrArray : Array,
   LocalKeywordStrArray : Array,
   PromptInit : Number,
   StringForTrue : String,
   StringForFalse : String,
   DefaultValue : Boolean
) : {
   Keyword : String,
   Value : Boolean,
   Result : String
}
COM native C++ 
HRESULT PromptForBoolOrKeyword( 
   BSTR Prompt,
   BSTR ErrorMsg,
   VARIANT GlobalKeywordStrArray,
   VARIANT LocalKeywordStrArray,
   LONG PromptInit,
   BSTR StringForTrue,
   BSTR StringForFalse,
   VARIANT_BOOL DefaultValue,
   BSTR* Keyword,
   VARIANT_BOOL* Value,
   dsPromptResultType_e* Result
) 
C++ 
DSRESULT PromptForBoolOrKeyword( 
   const dsString& Prompt,
   const dsString& ErrorMsg,
   const dsStringArray& GlobalKeywordStrArray,
   const dsStringArray& LocalKeywordStrArray,
   long PromptInit,
   const dsString& StringForTrue,
   const dsString& StringForFalse,
   bool DefaultValue,
   dsString* Keyword,
   bool* Value,
   dsPromptResultType_e* Result
) 

Parameters

Prompt[out]
Text to display as the prompt in the command window
ErrorMsg
Error message to display in the command window when the user input is invalid
GlobalKeywordStrArray
Array of global keywords, which are typically language independent (see Remarks)
LocalKeywordStrArray
Array of local keywords to display in the command window, which are typically translated to the local language (see Remarks)
PromptInit
Prompt initialization as defined in dsPromptInit_e (see Remarks)
StringForTrue
Text that indicates to return true (see Remarks)
StringForFalse
Text that indicates to return false (see Remarks)
DefaultValue
Default Boolean value to display in the prompt in the command window (see Remarks)
Keyword[out]
Keyword input by the user
Value[out]
Boolean value input by the user
Result[out] or Return Value
Result as defined in dsPromptResultType_e

Remarks

Local keywords can be seen in the prompt in the command window during user interaction. Global keywords cannot be seen in the prompt in the command window. However, users can type global keywords at the prompt in the command window if they know them.

The StringForTrue and StringForFalse parameters:

  • 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.

If the PromptInit parameter is set to:

  • dsPromptInit_e.dsPromptInit_NoDefault and a value is specified for DefaultValue, then the value is not used or displayed in the prompt in the command window.
  • dsPromptInit_e.UsePromptExplanation, then call ICommandMessage::PromptExplanation to specify the text for PromptInit.
 

See Also

Availability

DraftSight V1R4.0