Table of Contents

Class DxfPlotSettings

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

The settings a layout is plotted with, as AutoCAD's PlotSettings: the part AcDbPlotSettings of a LAYOUT, and a PLOTSETTINGS of the page setups (PlotSettingsDictionary); read as the file holds them.

public class DxfPlotSettings : DxfDBObject
Inheritance
DxfPlotSettings
Derived
Inherited Members

Remarks

The sizes of the sheet are in millimetres whatever PlotPaperUnits says, as AutoCAD writes them: a sheet of A3 laid on its side is 420 by 297, its margins 7.5 at the sides and 20 above and below in a drawing ezdxf made. What a sheet needs is set as AutoCAD's PlotSettingsValidator sets it: its name and with it its size (CanonicalMediaName), its PlotPaperUnits, PlotRotation, PlotPaperMargins and PlotOrigin; a layout set to ISO_A2_(594.00_x_420.00_MM) lies on a sheet 594 by 420. What is plotted and how is set as the validator and AutoCAD's PlotSettings set it too: the plotter's name (PlotConfigurationName), the plot style table, PlotType and the window, the scale standard or custom, and the flags of centring, plot styles and lineweights; a page setup of A3 at 1:20 with monochrome.ctb is read back as written. The rest is read and not written: a change to it is AutoCAD's plotting to see to.

Constructors

DxfPlotSettings()

Makes page settings in code, as AutoCAD's new PlotSettings(false), given their record when they are added to the page setups of a drawing: db.PlotSettingsDictionary.SetAt("A3 plan", new DxfPlotSettings()). They are those of a layout made in code, a sheet of ISO A3, until they are set or copied into (CopyFrom(DxfPlotSettings)).

Properties

CanonicalMediaName

Gets or sets the name of the sheet as the plotter calls it (group 4), as AutoCAD's CanonicalMediaName, such as ISO_full_bleed_A3_(420.00_x_297.00_MM); empty where it has none.

CurrentStyleSheet

Gets or sets the name of the plot style table (group 7), as AutoCAD's CurrentStyleSheet, such as monochrome.ctb; empty where it has none.

CustomPrintScale

Gets or sets the scale of the plot as a ratio (groups 142 and 143), as AutoCAD's CustomPrintScale; 1:1 where it gives none.

DrawViewportsFirst

Gets whether the viewports are plotted before the rest of paper space (flag 512), as AutoCAD's DrawViewportsFirst.

ModelType

Gets whether the settings are those of model space (flag 1024), as AutoCAD's ModelType: true for the layout Model.

PlotCentered

Gets or sets whether the plot is centred on the sheet (flag 4), as AutoCAD's PlotCentered.

PlotConfigurationName

Gets or sets the name of the plotter's configuration (group 2), as AutoCAD's PlotConfigurationName, such as DWG To PDF.pc3; empty where it has none.

PlotHidden

Gets whether the lines behind are hidden in the plot (flag 8), as AutoCAD's PlotHidden.

PlotOrigin

Gets or sets how far the plot is moved on the sheet (groups 46 and 47), as AutoCAD's PlotOrigin, in millimetres.

PlotPaperMargins

Gets or sets the margins of the sheet, as AutoCAD's PlotPaperMargins: its MinPoint the left (group 40) and bottom (41) margins, its MaxPoint the right (42) and top (43), in millimetres.

PlotPaperSize

Gets the size of the sheet (groups 44 and 45), as AutoCAD's PlotPaperSize, in millimetres: (420, 297) for A3 on its side. It is set with the sheet's name, CanonicalMediaName, as AutoCAD sets it.

PlotPaperUnits

Gets or sets the units the sheet is set out in (group 72), as AutoCAD's PlotPaperUnits; inches where it gives none.

PlotPlotStyles

Gets or sets whether the plot styles are plotted (flag 32), as AutoCAD's PlotPlotStyles.

PlotRotation

Gets or sets how the plot is turned on its sheet (group 73), as AutoCAD's PlotRotation.

PlotSettingsName

Gets or sets the name of the page setup (group 1), as AutoCAD's PlotSettingsName; empty where it has none. A page setup added to the drawing's page setups has the name of its entry; a layout has the name of the page setup copied into it last, empty where it has had none.

PlotType

Gets or sets what is plotted (group 74), as AutoCAD's PlotType; what is shown where it gives none.

PlotViewName

Gets or sets the name of the view plotted where PlotType is a view (group 6), as AutoCAD's PlotViewName; empty where it has none.

PlotViewportBorders

Gets whether the borders of the viewports are plotted (flag 1 of group 70), as AutoCAD's PlotViewportBorders.

PlotWindowArea

Gets or sets the window plotted where PlotType is a window (groups 48 and 49, 140 and 141), as AutoCAD's PlotWindowArea.

PrintLineweights

Gets or sets whether the lineweights of the entities are plotted (flag 128), as AutoCAD's PrintLineweights.

ScaleLineweights

Gets or sets whether the lineweights are scaled with the plot (flag 64), as AutoCAD's ScaleLineweights.

ShadePlot

Gets how the viewports are shaded when plotted (group 76), as AutoCAD's ShadePlot.

ShadePlotCustomDpi

Gets the dots per inch of a shaded plot of the custom level (group 78), as AutoCAD's ShadePlotCustomDpi; 300 where it gives none.

ShadePlotResLevel

Gets how finely a shaded plot is made (group 77), as AutoCAD's ShadePlotResLevel; normal where it gives none.

ShowPlotStyles

Gets whether the plot styles are shown on the sheet (flag 2), as AutoCAD's ShowPlotStyles.

StdScale

Gets the standard scale of the plot as a number (group 147), as AutoCAD's StdScale; 1 where it gives none.

StdScaleType

Gets or sets the standard scale of the plot (group 75), as AutoCAD's StdScaleType; scaled to fit where it gives none.

UseStandardScale

Gets or sets whether the plot is at its standard scale (flag 16), as AutoCAD's UseStandardScale.

Methods

CopyFrom(DxfPlotSettings)

Copies every setting of other page settings into these, as AutoCAD's CopyFrom does, the name with them: the plotter, the sheet and its margins, the origin and turn, what is plotted and its window, the scale, the plot style table, the flags of centring, plot styles and lineweights, and the shade plot. What is kept is whether the settings are those of model space (flag 1024), so that a page setup copied into the layout Model leaves it model space's. A layout's limits follow its sheet again, as DxfLayout makes them. Copying a page setup into a layout is AutoCAD's Set Current; copying a layout into a new page setup, its New.

ToString()

Gives the settings as a line for debugging: their type, handle and name.