Table of Contents

Method Ask

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

Ask(CadAskKind, string, GeoPoint3?, IReadOnlyList<string>, string)

Asks the user and waits for the answer. The prompt appears on the command line of the drawing the run works in, the user answers it as any command's: clicking on the canvas, typing a point or a number, a keyword by its capital letters, or Enter. The app stays free meanwhile, for the user and for every other client.

public CadRemoteAnswer Ask(CadAskKind kind, string message, GeoPoint3? basePoint = null, IReadOnlyList<string> keywords = null, string defaultValue = null)

Parameters

kind CadAskKind

What the prompt asks for.

message string

What the command line says, such as Specify the first step; it is followed by a colon.

basePoint GeoPoint3?

The point a rubber band is drawn from and a distance or an angle is measured from; null for none.

keywords IReadOnlyList<string>

The keywords offered, written as AutoCAD writes them (Undo, mOde); null for none, and required for Keyword.

defaultValue string

The default Enter takes, shown in angle brackets; null for none.

Returns

CadRemoteAnswer

What the user answered.

Exceptions

ArgumentNullException

Thrown when the message is null.

CadRemoteException

Thrown with IsCancelled true when the user pressed Esc; with it false when the run has ended, another question of it is still open, or the app is closing.