CadInPlaceEdit
from OpenCAD2D import CadInPlaceEdit
class CadInPlaceEdit(System.Object) ยท CadInPlaceEdit in the .NET reference
A text a command asks to be edited in place on the canvas (CadPrompt.InPlace): what it is, the words as written, and where and how large it stands, so that the window can put its editor over it in the text's own place, height and angle.
Constructors
__init__
def __init__(
self,
kind: CadInPlaceKind,
handle: str,
value: str,
location: GeoPoint2,
height: float,
rotation: float,
width: float,
styleName: str,
attachment: int,
) -> None
Makes the description of a text edited in place.
Properties and fields
Attachment
@property
def Attachment(self) -> int
Gets how an MTEXT is attached at its location, 1 top left to 9 bottom right.
ChangesBox
@property
def ChangesBox(self) -> bool
Gets whether the editor changed the box: its width, attachment, line spacing, background mask, defined height or columns.
FieldShown
@property
def FieldShown(self) -> System.Collections.Generic.IReadOnlyList[str]
Gets the words each field written in CadInPlaceEdit.Value came to, in their order, for the editor to show; empty where the text has none.
Frame
@property
def Frame(self) -> CadMTextFrame | None
Gets the box an MTEXT being made opens in the editor with, where MTEXT's Columns option gave it columns: two static columns 93.75 wide with a gutter of 12.5, 200 in all and 25 high, for an MTEXT 2.5 high given the Static defaults; null where the editor opens with CadInPlaceEdit.Width alone. What the editor makes of it is CadInPlaceEdit.NewFrame.
Handle
@property
def Handle(self) -> str | None
Gets the handle of the entity edited; null for an MTEXT being made.
Height
@property
def Height(self) -> float
Gets the height of its letters.
IsTableCell
@property
def IsTableCell(self) -> bool
Gets whether a table cell is edited.
Kind
@property
def Kind(self) -> CadInPlaceKind
Gets what the text is.
Location
@property
def Location(self) -> GeoPoint2
Gets where the text stands.
Move
@property
def Move(self) -> CadTableCellMove
@Move.setter
def Move(self, value: CadTableCellMove) -> None
Gets or sets where the editor of a table cell goes once the words are written, as AutoCAD's keys move it: Tab to the next cell, Shift+Tab to the one before, Enter to the cell below; none where the edit ends. The window sets it before it answers the prompt.
NewAnnotative
@property
def NewAnnotative(self) -> bool | None
@NewAnnotative.setter
def NewAnnotative(self, value: bool | None) -> None
Gets or sets whether an MTEXT being made was made annotative (true) or not (false) with the Annotative button of the editor, over what its text style says; null where it was not changed. An MTEXT already made keeps its own state.
NewAttachment
@property
def NewAttachment(self) -> int | None
@NewAttachment.setter
def NewAttachment(self, value: int | None) -> None
Gets or sets the attachment an MTEXT was justified to in the editor (Justification, 1 top left to 9 bottom right); null where it was not changed.
NewFrame
@property
def NewFrame(self) -> CadMTextFrame | None
@NewFrame.setter
def NewFrame(self, value: CadMTextFrame | None) -> None
Gets or sets the box an MTEXT was given in the editor where its defined height or columns changed (the ruler's height grips, Set Mtext Height, Column Settings), which the command writes with the words; null where they did not.
NewLineSpacing
@property
def NewLineSpacing(self) -> float | None
@NewLineSpacing.setter
def NewLineSpacing(self, value: float | None) -> None
Gets or sets the line spacing factor an MTEXT was given in the editor (Line Spacing, 1 single); null where it was not changed.
NewMask
@property
def NewMask(self) -> CadMTextMask | None
@NewMask.setter
def NewMask(self, value: CadMTextMask | None) -> None
Gets or sets the background mask an MTEXT was given in the editor (Background Mask); null where it was not changed.
NewWidth
@property
def NewWidth(self) -> float | None
@NewWidth.setter
def NewWidth(self, value: float | None) -> None
Gets or sets the width an MTEXT's frame was dragged to in the editor, which the command writes with the words; null where it was not dragged. The window sets it before it answers the prompt.
Rotation
@property
def Rotation(self) -> float
Gets the angle of its baseline in radians.
StyleName
@property
def StyleName(self) -> str
Gets the text style.
TableColumn
@property
def TableColumn(self) -> int
Gets the column of the table cell edited, from nought; -1 for any other text.
TableLive
@property
def TableLive(self) -> CadTableLive | None
Gets the preview of the table's rows for the words typed in the cell edited, which the window updates with each key and draws the table from; null for any other text. The drawing is not written until the editor closes.
TableRow
@property
def TableRow(self) -> int
Gets the row of the table cell edited, from nought, where CadInPlaceEdit.Handle is a table's; -1 for any other text.
Value
@property
def Value(self) -> str
Gets the words as written: of a text with fields the words with the code of each field in its place, Drawn %<\AcVar Date \f "dd/MM/yyyy">%.
Width
@property
def Width(self) -> float
Gets the width of an MTEXT's box; nought for none.