Method Initialize
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Initialize()
Gives a layout of paper space the viewport that shows its sheet, as AutoCAD's Initialize: a VIEWPORT of
Number 1 in its block ahead of the viewports it has, on and stacked first (68 of 1), about
the middle of its Limits and 1.1 times their size, showing the sheet at 1:1, as ezdxf makes the main
viewport of a layout; the layout's last active viewport (group 331) where it names none. A layout that has its
viewport 1 is given nothing.
public DxfViewport Initialize()
Returns
- DxfViewport
The viewport 1 of the layout, as AutoCAD gives its id: the one made, or the one it had.
Remarks
A layout added as AddToLayoutDictionary(DxfDatabase, DxfBlockTableRecord) adds one, of limits (-7.5, -20) to (412.5, 277), is given a viewport about (202.5, 128.5) 462 by 326.7, its view about the same point 326.7 high. Limits of no area are taken as the sheet from (0, 0) to its PlotPaperSize. The first VIEWPORT of a layout is the one AutoCAD and BricsCAD take for its sheet: a layout that has viewports and no viewport 1, as Layout1 given one 50 by 40 turned on, has them moved after the new one, their handles kept, and those stacked on (68 of 1 or more) moved up one, the 50 by 40 from 1 to 2. A viewport 1 keeps its size when the sheet is set after it is made, as AutoCAD draws it anew when it next shows the layout: a sheet is best set before.
Exceptions
- InvalidOperationException
Thrown when the layout is in no drawing, is erased, or is Model, whose viewports are records of the VPORT table, or has no block.