Table of Contents

CadMlineStyleRequest

from OpenCAD2D import CadMlineStyleRequest

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

What MLSTYLE gives its Multiline Style dialog: the styles of the drawing, the current one, and the buttons of AutoCAD 2021's dialog as calls that act at once, as AutoCAD's do, each one edit of MLSTYLE's one undo step: New (CadMlineStyleRequest.Add), Modify, Rename, Delete, Load and Save. The style made current by Set Current (CadMlineStyleRequest.Current) is set when the dialog closes with OK. Each call gives the reason it was refused, in the words of the typed MLSTYLE, or null.

Properties and fields

Current

.NET

@property
def Current(self) -> str
@Current.setter
def Current(self, value: str | None) -> None

Gets or sets the style Set Current chose, made current when the dialog closes with OK.

Document

.NET

@property
def Document(self) -> CadDocument

Gets the document whose styles are listed.

IsAccepted

.NET

@property
def IsAccepted(self) -> bool
@IsAccepted.setter
def IsAccepted(self, value: bool) -> None

Gets or sets whether the dialog closed with OK.

Names

.NET

@property
def Names(self) -> System.Collections.Generic.IReadOnlyList[str]

Gets the names of the styles of the drawing, in capitals, sorted by their letters as the typed "?" lists them.

Methods

Add

.NET

def Add(self, name: str, settings: DxfMlineStyleSettings) -> str

New: adds a style of a name.

Delete

.NET

def Delete(self, name: str) -> str

Delete: removes a style that is not STANDARD, current or in use.

IsLocked

.NET

def IsLocked(self, name: str) -> bool

Gets whether only the description of a style may be modified: STANDARD, or a style a multiline is drawn by.

Load

.NET

def Load(self, path: str, name: str) -> str

Load: adds a style of a file of them.

Modify

.NET

def Modify(self, name: str, settings: DxfMlineStyleSettings) -> str

Modify: gives a style new settings; of STANDARD or a style in use, only the description is taken.

NamesInFile

.NET

def NamesInFile(self, path: str) -> tuple[System.Collections.Generic.IReadOnlyList[str], str]

The names of the styles a file of them holds, in its order (Load's list).

Rename

.NET

def Rename(self, oldName: str, newName: str) -> str

Rename: a style other than STANDARD takes a new name, the current style kept current.

Save

.NET

def Save(self, name: str, path: str) -> str

Save: writes a style to a file of them, its other styles kept.

SettingsOf

.NET

def SettingsOf(self, name: str) -> DxfMlineStyleSettings

Gets a copy of what a style is made of; null for a name the drawing has not.

WhyNotDeleted

.NET

def WhyNotDeleted(self, name: str) -> str

Gets why a style may not be deleted (STANDARD, the current style, one in use); null where it may.

WhyNotNamed

.NET

def WhyNotNamed(self, name: str) -> str

Gets why a name cannot be given to a new style; null for a name AutoCAD takes that the drawing has not.