Table of Contents

CadMTextParagraphFormat

from OpenCAD2D import CadMTextParagraphFormat

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

How a paragraph of an MTEXT is set, as AutoCAD 2021's ruler and Paragraph dialog set it: its indents, tab stops, paragraph spacing and line spacing, all in drawing units. Read from and written to the paragraph codes AutoCAD writes (\pxi-3.2,l4,r1.2,b0.8,a1.2,sm2,t6,c8;), which hold from the paragraph they are set in on.

Properties and fields

Default

.NET

Default: ClassVar[CadMTextParagraphFormat]

Gets the format of a paragraph with no codes: no indents, no stops, no spacing of its own.

FirstLineIndent

.NET

@property
def FirstLineIndent(self) -> float

Gets where the first line starts, from the left of the frame: the ruler's upper triangle.

HangingIndent

.NET

@property
def HangingIndent(self) -> float

Gets where the second and later lines start, from the left of the frame: the ruler's lower triangle.

LineSpacing

.NET

@property
def LineSpacing(self) -> str

Gets the paragraph's own line spacing: m multiple, e exactly, a at least; nought for the MTEXT's own.

LineSpacingValue

.NET

@property
def LineSpacingValue(self) -> float

Gets the value of the line spacing: the factor of a multiple (1.5 for 1.5x), the distance of exactly and at least (2.5 spaces the lines of an MTEXT 2.5 high as 1x does); 1 where the paragraph has none of its own.

RightIndent

.NET

@property
def RightIndent(self) -> float

Gets how far the lines stop short of the right of the frame.

SpaceAfter

.NET

@property
def SpaceAfter(self) -> float

Gets the space after the paragraph; nought for none.

SpaceBefore

.NET

@property
def SpaceBefore(self) -> float

Gets the space before the paragraph; nought for none.

TabStops

.NET

@property
def TabStops(self) -> System.Collections.Generic.IReadOnlyList[CadMTextTabStop]

Gets the tab stops, by position; past the last, a tab goes to the next multiple of four heights.

Methods

Equals

.NET

def Equals(self, other: CadMTextParagraphFormat) -> bool
def Equals(self, obj: object) -> bool

GetHashCode

.NET

def GetHashCode(self) -> int

Read

.NET

@staticmethod
def Read(before: CadMTextParagraphFormat, codes: str, height: float) -> CadMTextParagraphFormat

Reads the paragraph codes of a paragraph, in drawing units, over the format of the paragraph before it: a value after x is a number of heights, one without is a distance; * and tz reset; other codes are left alone. \pxi-3.2,l4; of an MTEXT 2.5 high starts the first line at 2 and the rest at 10.

WithIndents

.NET

def WithIndents(self, first: float, hanging: float, right: float) -> CadMTextParagraphFormat

Gets the format with other indents.

WithLineSpacing

.NET

def WithLineSpacing(self, mode: str, value: float) -> CadMTextParagraphFormat

Gets the format with a line spacing of its own, or none.

WithSpacing

.NET

def WithSpacing(self, before: float, after: float) -> CadMTextParagraphFormat

Gets the format with other paragraph spacing.

WithTabStops

.NET

def WithTabStops(self, stops: System.Collections.Generic.IEnumerable[CadMTextTabStop]) -> CadMTextParagraphFormat

Gets the format with other tab stops, sorted by position; of two at one place the later is kept, as AutoCAD keeps it.

WriteAfter

.NET

def WriteAfter(self, before: CadMTextParagraphFormat, height: float) -> str

Writes the codes that make this format of the format of the paragraph before, as AutoCAD writes them: only what differs, in the order i, l, r, b, a, s, t, after x in heights of the MTEXT where a value is not nought. A tab stop at 10 after a paragraph of none, in an MTEXT 2.5 high, writes \pxt4;; going back to none, \ptz;; the same format writes nothing.