CadPlotStyleFolder
from OpenCAD2D import CadPlotStyleFolder
class CadPlotStyleFolder(System.Object) ยท CadPlotStyleFolder in the .NET reference
The folder of plot style tables the Plot and Page Setup dialogs list and a plot reads, as AutoCAD's Plot Styles folder, and the tables the presenter makes itself: acad.ctb, monochrome.ctb, grayscale.ctb and the three screening tables, acad.stb, monochrome.stb and grayscale.stb. None is a file of AutoCAD's; they are made by CadPlotStyleFolder.BuiltIn and written to the folder by CadPlotStyleFolder.EnsureBuiltIns.
Properties and fields
BuiltInNames
BuiltInNames: ClassVar[System.Collections.Generic.IReadOnlyList[str]]
Gets the names of the tables the presenter makes, in the order the lists show them, with the extension: acad.ctb and on.
DefaultPath
DefaultPath: ClassVar[str]
The name of the folder the presenter makes where Global settings give none: PlotStyles under %AppData%\OpenCAD2D.
Methods
BuiltIn
@staticmethod
def BuiltIn(fileName: str) -> CadPlotStyleSheet
Makes one of the tables the presenter makes. acad changes nothing; monochrome plots every colour in black; grayscale plots every colour as the grey of its brightness (dithering and grayscale on, the object's colour kept); Screening 25%, 50 and 75 plot the object's colour screened to that per cent.
CheckFileName
@staticmethod
def CheckFileName(name: str) -> str
Says why a name cannot name a plot style table file, as Windows refuses one: empty, longer than 120 letters, or with a character a file name cannot hold. The extension is not part of the name.
EnsureBuiltIns
@staticmethod
def EnsureBuiltIns(folder: str) -> System.Collections.Generic.IReadOnlyList[str]
Makes the folder where it is missing and writes the tables the presenter makes that it lacks, never one it has: a table the user edited is kept. The window calls it as it starts and after Global settings change the folder.
Load
@staticmethod
def Load(folder: str, fileName: str) -> CadPlotStyleSheet
Reads a table of a folder by its name: the file, letters of either case the same; where the file is not there, or the folder is empty, the built-in table of that name. A file that does not read is said once in the log, as a warning, and the built-in table of its name stands in where there is one.
Names
@staticmethod
def Names(folder: str, named: bool) -> System.Collections.Generic.IReadOnlyList[str]
Gets the names of the tables a folder holds, to list in the Plot dialog: its .ctb files (named false) or its .stb files, in ordinal order of their names with letters of either case the same, ties by case. Where folder is empty, the names of the tables the presenter makes of that kind.
Resolve
@staticmethod
def Resolve(setting: str, settingsFile: str | None = ...) -> str
Gets the folder a setting stands for: the setting, trimmed, where it names one; where it is empty the folder PlotStyles beside the settings file, which is CadPlotStyleFolder.DefaultPath for the user's own settings file.