Table of Contents

CadInput

from OpenCAD2D import CadInput

class CadInput(System.Object) ยท CadInput in the .NET reference

The answer a command got to its last prompt.

Properties and fields

Control

.NET

@property
def Control(self) -> bool

Gets whether Ctrl was held as the point, distance or angle was picked on the canvas, as ARC and PLINE take a point picked with Ctrl held to draw the arc the other way round, and a grip edit takes its first point so picked as Copy; false for an answer typed and for every other answer.

Handles

.NET

@property
def Handles(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the handles of a selection, in ordinal order, or of the one object picked.

IsNone

.NET

@property
def IsNone(self) -> bool

Gets whether the answer is Enter with nothing typed.

IsPoint

.NET

@property
def IsPoint(self) -> bool

Gets whether the answer is a point.

Kind

.NET

@property
def Kind(self) -> CadInputKind

Gets what kind of answer it is.

Number

.NET

@property
def Number(self) -> float

Gets the number of a distance, an angle (in radians) or a whole number.

Point

.NET

@property
def Point(self) -> GeoPoint2

Gets the point of a point answer, the point picked for a distance or an angle, and the point one object was picked at on the canvas.

Shift

.NET

@property
def Shift(self) -> bool

Gets whether Shift was held as the one object was picked on the canvas, as TRIM takes a Shift-pick to extend; false for every other answer.

Text

.NET

@property
def Text(self) -> str

Gets the keyword of a keyword answer, as the prompt writes it, or the text of a text answer.

Methods

Is

.NET

def Is(self, keyword: str) -> bool

Gets whether the answer is a keyword, either case.

ToString

.NET

def ToString(self) -> str