Table of Contents

Method PickPoint

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

PickPoint(string, GeoPoint3?, TimeSpan?)

Asks the user for a point and waits for the answer. The drawing is shown, the prompt appears on the app's command line, and the user clicks on the canvas (with the snaps and the object snaps the drawing has on) or types the point. The app stays free for the user while the call waits. The point is in world coordinates, its Z nought.

public GeoPoint3 PickPoint(string prompt, GeoPoint3? basePoint = null, TimeSpan? timeout = null)

Parameters

prompt string

What the command line asks, such as Pick the corner of the frame; it is followed by a colon.

basePoint GeoPoint3?

A point to draw a rubber band from while the user moves the cursor; null for none.

timeout TimeSpan?

How long to wait for the user; null for as long as it takes. The pick is ended in the app when the time is up.

Returns

GeoPoint3

The point picked.

Exceptions

ArgumentNullException

Thrown when the prompt is null.

ArgumentOutOfRangeException

Thrown when the time is negative.

CadRemoteException

Thrown with IsCancelled true when the user presses Esc; with it false when the time is up, a command is running in the drawing, another program is waiting for the user to pick, or the drawing is closed.