Table of Contents

CadTableDrag

from OpenCAD2D import CadTableDrag

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

A drag of a grip of a table, as AutoCAD 2021 drags them: a line between columns or rows, a stretch grip of the whole table, or the autofill grip of cells. CadTableDrag.Update follows the cursor and says what the drag will make, the new line, the new outline, the cells to fill and their values, and a tip; CadTableDrag.Commit makes it, one undo step ("Column Width", "Row Height", "Table Size" or "Autofill"); dropped, it changes nothing.

Properties and fields

FillSeries

.NET

FillSeries: ClassVar[DxfTableFillOptions]

The fill an autofill makes unless another is chosen: Fill Series, a series in the look of the source.

Changing

.NET

@property
def Changing(self) -> int

Gets the number of the column (or row) whose size the tip gives, from nought: the one left of (or above) the line dragged, the first where the line is the table's left (or top) edge; -1 for another kind of drag.

FillOptions

.NET

@property
def FillOptions(self) -> DxfTableFillOptions
@FillOptions.setter
def FillOptions(self, value: DxfTableFillOptions) -> None

Gets or sets how an autofill fills, as the right-click menu of the drag chooses it: CadTableDrag.FillSeries by default, a series alone for Fill Series Without Formatting, the content and the format for Copy Cells, the content alone without formatting, the format alone for Fill Formatting Only. Along the rows and Reverse are added by the way the grip is dragged, right or left, up or left.

FillRange

.NET

@property
def FillRange(self) -> DxfCellRange | None

Gets the cells an autofill would fill: the source's width (or height) from its edge to the cell under the cursor; null where it would fill none.

Handle

.NET

@property
def Handle(self) -> str

Gets the handle of the table.

Heights

.NET

@property
def Heights(self) -> System.Collections.Generic.IReadOnlyList[float]

Gets the heights of the rows as the drag would leave them.

IsFirstEdge

.NET

@property
def IsFirstEdge(self) -> bool

Gets whether the line dragged is the table's left (or top) edge, which moves the table along with it.

Kind

.NET

@property
def Kind(self) -> CadTableDragKind

Gets what the drag changes.

Line

.NET

@property
def Line(self) -> System.Array[GeoPoint2] | None

Gets the two ends of the line dragged, where the drag would leave it, across the whole table, the top (or left) first; null for a stretch or an autofill.

Outline

.NET

@property
def Outline(self) -> System.Array[GeoPoint2] | None

Gets the corners of the table as a stretch would leave it, the top left first, then about it; null for a drag of another kind.

Source

.NET

@property
def Source(self) -> DxfCellRange

Gets the cells the autofill grip was dragged from.

Tip

.NET

@property
def Tip(self) -> str | None

Gets the tip the drag shows by the cursor: "C width = 38.00" or "Row 4 height = 12.00" to the drawing's LUPREC, the table's new size for a stretch, the value of the cell farthest from the source for an autofill; null for none.

Values

.NET

@property
def Values(self) -> System.Collections.Generic.IReadOnlyList[CadTableCellValue]

Gets the cells an autofill would fill and what each would hold; empty where none.

Widths

.NET

@property
def Widths(self) -> System.Collections.Generic.IReadOnlyList[float]

Gets the widths of the columns as the drag would leave them.

Methods

Autofill

.NET

@staticmethod
def Autofill(document: CadDocument, handle: str, source: DxfCellRange) -> CadTableDrag

Starts a drag of the autofill grip of cells selected.

Column

.NET

@staticmethod
def Column(document: CadDocument, handle: str, line: int, cellEdge: bool) -> CadTableDrag

Starts a drag of a line of columns: line 0 is the table's left edge, 1 the line right of column A, and the number of columns its right edge. A column grip of the whole table drags a line inside it, the table's width kept unless Ctrl is held; a cell's edge grip changes the column left of the line alone.

Commit

.NET

def Commit(self) -> CadEditResult

Makes the drag: one undo step; nothing written where it changes nothing.

FromGrip

.NET

@staticmethod
def FromGrip(document: CadDocument, handle: str, gripIndex: int) -> CadTableDrag

Starts the drag a grip of a whole table makes, as CadGrips.Of gives them: a column grip, or a stretch grip; null for the move grip, which moves the table as any base grip does, the table breaking grip, which is not offered, and a grip of anything else.

Row

.NET

@staticmethod
def Row(document: CadDocument, handle: str, line: int) -> CadTableDrag

Starts a drag of a line of rows by a cell's top or bottom edge grip: line 0 is the table's top edge, 1 the line under row 1, and the number of rows its bottom edge; the row above the line changes alone.

Size

.NET

@staticmethod
def Size(document: CadDocument, handle: str, width: bool, height: bool) -> CadTableDrag

Starts a drag of a stretch grip of a table: its width, its height, or both.

TypeSize

.NET

def TypeSize(self, size: float) -> bool

Takes a typed size, as the field of dynamic input does: the column (or row) the tip names made that wide (or high), held at its least, the line moved by as much.

Update

.NET

def Update(self, cursor: GeoPoint2, control: bool) -> None

Follows the cursor: what the drag would make with the grip let go there.