Table of Contents

CadTextStyleEditor

from OpenCAD2D import CadTextStyleEditor

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

The edits of the text style table, as AutoCAD's Text Style dialog (STYLE) and -STYLE make them: each one undo step through CadDocument.ApplyEdit, refused where AutoCAD refuses it.

Methods

Add

.NET

@staticmethod
def Add(document: CadDocument, name: str, from_: str, /) -> CadEditResult

Adds a style, as New of the Text Style dialog: a copy of the settings of another (the style selected), under a name no style of the drawing has, letters of either case the same.

Apply

.NET

@staticmethod
def Apply(document: CadDocument, name: str, settings: CadTextStyleSettings) -> CadEditResult

Writes the settings into a style, as Apply of the Text Style dialog: every text written in it drawn again in them. Nothing is written, and nothing refused, where they are the style's already.

CountUses

.NET

@staticmethod
def CountUses(database: DxfDatabase, name: str) -> int

Gets how many texts are written in a style: the TEXTs, MTEXTs and attribute definitions of model space, the layouts and the blocks, as AutoCAD counts what keeps a style from being deleted.

Current

.NET

@staticmethod
def Current(database: DxfDatabase) -> str

Gets the name of the current text style ($TEXTSTYLE), as the drawing's table spells it; Standard where the header names none it has.

Delete

.NET

@staticmethod
def Delete(document: CadDocument, name: str) -> CadEditResult

Deletes a style, as Delete of the Text Style dialog: refused for Standard, the current style, a style texts are written in (saying how many) and one a dimension style or a table style points at.

Rename

.NET

@staticmethod
def Rename(document: CadDocument, name: str, newName: str) -> CadEditResult

Renames a style with every text written in it, as the Text Style dialog's Rename; Standard keeps its name, as in AutoCAD.

SetCurrent

.NET

@staticmethod
def SetCurrent(document: CadDocument, name: str) -> CadEditResult

Makes a style current ($TEXTSTYLE), as Set Current and the style box do.

Styles

.NET

@staticmethod
def Styles(database: DxfDatabase) -> System.Collections.Generic.IReadOnlyList[DxfTextStyleTableRecord]

Gets the styles of a drawing that are of letters, not shapes, in the order of the table.