Hide Table of Contents
PromptForMouseOrKeyword Method (ICommandMessage)
[out]
Result as defined in dsPromptResultType_e

Obsolete. Superseded by ICommandMessage::PromptForMouseOrKeyword2.

.NET Syntax

Visual Basic (Declaration) 
Function PromptForMouseOrKeyword( _
   const dsString& Prompt As System.String, _
   const dsString& ErrorMsg As System.String, _
   const dsStringArray& GlobalKeywordStrArray As System.Object, _
   const dsStringArray& LocalKeywordStrArray As System.Object, _
   long PromptInit As System.Integer, _
   bool ShowRubberLine As System.Boolean, _
   dsMathPoint* DefaultValue As MathPoint, _
   dsMathPoint* BasePoint As MathPoint, _
   dsMathPlane* Plane As MathPlane, _
   dsString* Keyword As System.String, _
   dsMathPoint** ResultPoint As MathPoint, _
   dsPromptKeyboardModificators_e* Modificators As dsPromptKeyboardModificators_e, _
   dsMouseEventType_e* MouseResult As dsMouseEventType_e _
) As dsPromptResultType_e
C# 
dsPromptResultType_e PromptForMouseOrKeyword( 
   System.string Prompt,
   System.string ErrorMsg,
   System.object GlobalKeywordStrArray,
   System.object LocalKeywordStrArray,
   System.int PromptInit,
   System.bool ShowRubberLine,
   MathPoint DefaultValue,
   MathPoint BasePoint,
   MathPlane Plane,
   out System.string Keyword,
   out MathPoint ResultPoint,
   out dsPromptKeyboardModificators_e Modificators,
   out dsMouseEventType_e MouseResult
)
JavaScript 
PromptForMouseOrKeyword( 
   Prompt : String,
   ErrorMsg : String,
   GlobalKeywordStrArray : Array,
   LocalKeywordStrArray : Array,
   PromptInit : Number,
   ShowRubberLine : Boolean,
   DefaultValue : dsMathPoint,
   BasePoint : dsMathPoint,
   Plane : dsMathPlane
) : {
   Keyword : String,
   ResultPoint : dsMathPoint,
   Modificators : String,
   MouseResult : String,
    : String
}
COM native C++ 
HRESULT PromptForMouseOrKeyword( 
   BSTR Prompt,
   BSTR ErrorMsg,
   VARIANT GlobalKeywordStrArray,
   VARIANT LocalKeywordStrArray,
   LONG PromptInit,
   VARIANT_BOOL ShowRubberLine,
   IMathPoint* DefaultValue,
   IMathPoint* BasePoint,
   IMathPlane* Plane,
   BSTR* Keyword,
   IMathPoint** ResultPoint,
   dsPromptKeyboardModificators_e* Modificators,
   dsMouseEventType_e* MouseResult,
   dsPromptResultType_e*Result 
) 
C++ 
DSRESULT PromptForMouseOrKeyword( 
   const dsString& Prompt,
   const dsString& ErrorMsg,
   const dsStringArray& GlobalKeywordStrArray,
   const dsStringArray& LocalKeywordStrArray,
   long PromptInit,
   bool ShowRubberLine,
   dsMathPoint* DefaultValue,
   dsMathPoint* BasePoint,
   dsMathPlane* Plane,
   dsString* Keyword,
   dsMathPoint** ResultPoint,
   dsPromptKeyboardModificators_e* Modificators,
   dsMouseEventType_e* MouseResult,
   dsPromptResultType_e*Result 
) 

Parameters

Prompt
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 keyword strings, which typically are language independent (see Remarks)
LocalKeywordStrArray
Array of local keyword strings, 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 band that stretches from the origin, or from the BasePoint, to the location of the cursor; false to not display the rubber band (see Remarks)
DefaultValue
Default value for the mouse click point in the command window prompt (see Remarks)
BasePoint
Base point (see Remarks)
Plane
Projection plane
Keyword
User's keyword input
ResultPoint
User's click Point
Modificators
User's key click modifiers as defined in dsPromptKeyboardModificators_e
MouseResult
User's mouse click type as defined in dsMouseEventType_e
[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 band stretches from the BasePoint (or origin) to the location of the cursor in the drawing.

Keywords are context-sensitive options that are available in the Options toolbar when executing a command. Keywords in LocalKeywordStrArray are displayed in the prompt in the command window during user interaction. Keywords in GlobalKeywordStrArray are not displayed in the prompt in the command window. However, users can type global keywords in 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

Availability

DraftSight 2020 SP0


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   PromptForMouseOrKeyword Method (ICommandMessage)
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2020 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.