CadMTextImport
from OpenCAD2D import CadMTextImport
class CadMTextImport(System.Object) ยท CadMTextImport in the .NET reference
What the MTEXT editor's Import Text reads from a file: a text file (.txt) as paragraphs of plain letters, or a rich text file (.rtf) as paragraphs of runs with the font, bold, italic, underline, strikethrough, colour and size they have there. A file over 32 KB is refused, as AutoCAD 2021 refuses it.
Properties and fields
MaxBytes
MaxBytes: ClassVar[int]
The largest file Import Text takes, in bytes: 32 KB.
Methods
FromFile
@staticmethod
def FromFile(path: str, height: float) -> CadMTextContent
Reads a file: an RTF where it begins {\rtf, else a text file.
FromRtf
@staticmethod
def FromRtf(rtf: str, height: float) -> CadMTextContent
Reads rich text as the class says.
FromText
@staticmethod
def FromText(text: str) -> CadMTextContent
Reads plain words: each line a paragraph, in no look of its own.