Class CadLayouts
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
Makes layouts and sets them up from code: a new layout on a sheet, its page setup (sheet, turn, what is plotted, scale and plot style) and viewports at a scale, the work of LAYOUT New, the page setup and MVIEW with a scale given. Each call is one undo step. A script that lays a sheet out, the Python package and the remote channel use it.
public static class CadLayouts
- Inheritance
-
CadLayouts
- Inherited Members
Methods
- Add(CadDocument, string, string, bool)
Adds a layout and sets its sheet, as LAYOUT New and the page setup do: the sheet of the paper given on its side or turned, what is plotted the layout itself at 1:1. It is not made the layout shown. One undo step.
- AddViewport(CadDocument, string, double[], string, double[], IEnumerable<string>)
Adds a viewport to a layout that shows model space at a scale, as MVIEW with two corners and the scale of ZOOM nXP: the frame is the viewport's rectangle on the sheet, the view is centred on a point of model space and shows
scalepaper millimetres to the unit, and the layers named are frozen in this viewport only. A frame 200 wide and 100 high at 1:50 shows 10 000 by 5 000 units. One undo step.
- List(CadDocument)
Reads how every layout of a drawing is set up, model space first, then the tabs in their order.
- Paper(string)
The sheet of a name in the plotter's list:
ISO A3,ISO_A3andA3are one, letters of either case the same.
- ParseScale(string, out double, out double)
Reads a scale as paper millimetres to drawing units:
1:50is 1 to 50,2:1is 2 to 1, and a plain number is paper millimetres to one unit (0.02is 1:50).
- ScaleText(double)
The scale as
1:50or2:1; null where it is not a number above nought.
- SetPageSetup(CadDocument, string, string, string, string, string, string)
Changes the page setup of a layout, as the Page Setup dialog does: only what is given is changed. One undo step.