Method ReadPageSetup
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
ReadPageSetup(CadDocument, CadSpace, string)
Reads a page setup of the drawing by name, as choosing it in the Page setup list of the Plot dialog applies it to the space plotted: the settings read as Read(CadDocument, CadSpace) reads a layout's.
public static CadPlotSettings ReadPageSetup(CadDocument document, CadSpace space, string name)
Parameters
documentCadDocumentThe document.
spaceCadSpaceThe space it is applied to: a layout's sheet is plotted as the layout only in a layout.
namestringThe page setup's name, letters of either case the same.
Returns
- CadPlotSettings
The settings, a new object; null where the drawing has no page setup of the name.
Exceptions
- ArgumentNullException
Thrown when an argument is null.
ReadPageSetup(DxfDatabase, string, bool)
Reads a page setup of a drawing opened without a document, as Import Page Setups shows the details of the one chosen: the settings read as ReadPageSetup(CadDocument, CadSpace, string) reads them.
public static CadPlotSettings ReadPageSetup(DxfDatabase database, string name, bool isModel)
Parameters
databaseDxfDatabaseThe drawing, as Open(string) opens it.
namestringThe page setup's name, letters of either case the same.
isModelboolTrue to read it as the settings of model space, false as those of a layout.
Returns
- CadPlotSettings
The settings, a new object; null where the drawing has no page setup of the name.
Exceptions
- ArgumentNullException
Thrown when the drawing or the name is null.