Table of Contents

CadTableLive

from OpenCAD2D import CadTableLive

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

The rows of a table while a cell of it is typed in, as AutoCAD 2021's in-place editor shows them: the row of the cell grows to hold the lines typed and shrinks back as they are taken out, never below the height it stood at, and the rows under it move with it. It is a preview of the words typed, kept apart from the drawing, which is written once, when the editor closes (Esc writes nothing): the rows CadTableLive.RowHeights give are those the words give once written by CadTableEditor.SetText. In AutoCAD's Standard table style (text 4.5, rows 9 high) a cell of data typed with two lines makes its row 15.07 high, with three lines 22.57, with four 30.15; the rows under it stand 6.07, 13.57 and 21.15 lower, and with one line nothing moves.

Constructors

__init__

.NET

def __init__(self, document: CadDocument, handle: str, row: int, column: int) -> None

Starts the preview of a cell of a table typed in, the rows as they stand.

Properties and fields

ChangesRows

.NET

@property
def ChangesRows(self) -> bool

Gets whether a row is other than it stands at: the words typed need more room than the row has.

Column

.NET

@property
def Column(self) -> int

Gets the column of the cell typed in, from nought.

Handle

.NET

@property
def Handle(self) -> str

Gets the table's handle.

Items

.NET

@property
def Items(self) -> System.Collections.Generic.IReadOnlyList[DisplayItem2]

Gets the table drawn at the heights of CadTableLive.RowHeights, with the words of the cell typed in left out (the editor shows them); empty while no row differs from what it stands at, when the table in the drawing is drawn as it is.

Row

.NET

@property
def Row(self) -> int

Gets the row of the cell typed in, from nought.

RowHeights

.NET

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

Gets the height of each row once the words typed are written; the heights the rows stand at before any key.

Version

.NET

@property
def Version(self) -> int

Gets a count that goes up each time the rows of the preview change, so that a window knows the table is to be drawn again; it does not move for a key that leaves the rows as they were.

Methods

Shift

.NET

def Shift(self, attachment: int) -> GeoVector2

Gets how far the point a text of the cell typed in is attached at has moved along the table, in the drawing: the block's top edge for a text attached at the top (1 to 3), its bottom edge at the bottom (7 to 9), the middle of the block between them. Nought while the rows are as they stand.

Update

.NET

def Update(self, words: str) -> None

Lays the rows out for the words typed so far: the row of the cell is as high as the words need, and no lower than it stood; a block of merged cells across rows grows the rows it spans in proportion to their heights, as writing the words does. Nothing is written to the drawing.