PromptForPointOrKeyword Method (ICommandMessage)

PromptForPointOrKeyword Method (ICommandMessage) | Send Feedback
See Also

Result[out]
  Result as defined in dsPromptResultType_e

Prompt[out]
  Text for the prompt to display in the command window

ErrorMsg
  Error message to display in the command window if the user input is invalid

GlobalKeywordStrArray
  Array of global keywords, which typically are language independent (see Remarks)

LocalKeywordStrArray
  Array of local keywords, which are typically translated to the local language (see Remarks)

PromptInit
  Prompt initialization as defined in dsPromptInit_e (see Remarks)

ShowRubberLine
  True to display a rubber line from the origin, or from the BasePoint, to the location of the cursor; false to not display the rubber line (see Remarks)

DefaultValue
  Default value for the point in the prompt in the command window (see Remarks)

BasePoint
  Base point

Keyword[out]
  Keyword input by user

ResultPoint[out]
  Point input by user

Plane
  Projection plane cursor coordinates

Displays the specified prompt, local keywords, and default value for the point in the command window and gets the user's input.

# Syntax

Visual Basic |
--- | ---
    Function PromptForPointOrKeyword( _
       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 ShowRubberLine As System.Boolean, _
       ByVal DefaultValue As MathPoint, _
       ByVal BasePoint As MathPoint, _
       ByRef Keyword As System.String, _
       ByRef ResultPoint As MathPoint, _
       ByVal Plane As MathPlane _
    ) As dsPromptResultType_e

C# |
--- | ---
    dsPromptResultType_e PromptForPointOrKeyword(
       System.string Prompt,
       System.string ErrorMsg,
       System.object GlobalKeywordStrArray,
       System.object LocalKeywordStrArray,
       System.int PromptInit,
       System.bool ShowRubberLine,
       MathPoint DefaultValue,
       MathPoint BasePoint,
       out System.string Keyword,
       out MathPoint ResultPoint,
       MathPlane Plane
    )

JavaScript |
--- | ---
    PromptForPointOrKeyword(
       Prompt : String,
       ErrorMsg : String,
       GlobalKeywordStrArray : Array,
       LocalKeywordStrArray : Array,
       PromptInit : Number,
       ShowRubberLine : Boolean,
       DefaultValue : dsMathPoint,
       BasePoint : dsMathPoint,
       Plane : dsMathPlane
    ) : {
       Keyword : String,
       ResultPoint : dsMathPoint,
       Result : String
    }

COM native C++ |
--- | ---
    HRESULT PromptForPointOrKeyword(
       BSTR Prompt,
       BSTR ErrorMsg,
       VARIANT GlobalKeywordStrArray,
       VARIANT LocalKeywordStrArray,
       LONG PromptInit,
       VARIANT_BOOL ShowRubberLine,
       IMathPoint* DefaultValue,
       IMathPoint* BasePoint,
       BSTR* Keyword,
       IMathPoint** ResultPoint,
       IMathPlane* Plane,
       dsPromptResultType_e* Result
    )

C++ |
--- | ---
    DSRESULT PromptForPointOrKeyword(
       const dsString& Prompt,
       const dsString& ErrorMsg,
       const dsStringArray& GlobalKeywordStrArray,
       const dsStringArray& LocalKeywordStrArray,
       long PromptInit,
       bool ShowRubberLine,
       dsMathPoint* DefaultValue,
       dsMathPoint* BasePoint,
       dsString* Keyword,
       dsMathPoint** ResultPoint,
       dsMathPlane* Plane,
       dsPromptResultType_e* Result
    )

#### Parameters

Prompt[out]
  Text for the prompt to display in the command window
ErrorMsg
  Error message to display in the command window if the user input is invalid
GlobalKeywordStrArray
  Array of global keywords, which typically are language independent (see Remarks)
LocalKeywordStrArray
  Array of local keywords, which are typically translated to the local language (see Remarks)
PromptInit
  Prompt initialization as defined in dsPromptInit_e (see Remarks)
ShowRubberLine
  True to display a rubber line from the origin, or from the BasePoint, to the location of the cursor; false to not display the rubber line (see Remarks)
DefaultValue
  Default value for the point in the prompt in the command window (see Remarks)
BasePoint
  Base point
Keyword[out]
  Keyword input by user
ResultPoint[out]
  Point input by user
Plane
  Projection plane cursor coordinates
Result[out] or Return Value
  Result as defined in dsPromptResultType_e

# Remarks

ShowRubberLine must be set to true for the values specified for BasePoint to have an effect. The rubber line extends to the location of the cursor in the drawing.

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.

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

####

ICommandMessage Interface
ICommandMessage Members
ICommandMessage::PromptForPoint2 Method ()

# Availability

DraftSight V1R4.0