Table of Contents

Class CadPlotStyleFolder

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

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 BuiltIn(string) and written to the folder by EnsureBuiltIns(string).

public static class CadPlotStyleFolder
Inheritance
CadPlotStyleFolder
Inherited Members

Remarks

A document names its folder in PlotStyleFolder; where that is empty no disk is read and the built-in tables stand in, so that a plot of a drawing opened with no window is the same as before tables were files. Where a built-in table's file is not in the folder (deleted, or the folder made by hand) the built-in table stands in for it too; one the user has edited or replaced is read as it is.

Properties

BuiltInNames

Gets the names of the tables the presenter makes, in the order the lists show them, with the extension: acad.ctb and on.

DefaultPath

The name of the folder the presenter makes where Global settings give none: PlotStyles under %AppData%\OpenCAD2D.

Methods

BuiltIn(string)

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(string)

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(string)

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(string, string)

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(string, bool)

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(string, string)

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 DefaultPath for the user's own settings file.