Class Layout
Represents a layout.
Implements
Inherited Members
Namespace: netDxf.Objects
Assembly: CADability.dll
Syntax
public class Layout : TableObject, IHasXData, ICloneable, IComparable, IComparable<TableObject>, IEquatable<TableObject>, IComparable<Layout>
Constructors
| Improve this Doc View SourceLayout(String)
Initializes a new layout.
Declaration
public Layout(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | Layout name. |
Fields
| Improve this Doc View SourceModelSpaceName
Layout ModelSpace name.
Declaration
public const string ModelSpaceName = "Model"
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
| Improve this Doc View SourceAssociatedBlock
Gets the associated ModelSpace or PaperSpace block.
Declaration
public Block AssociatedBlock { get; }
Property Value
| Type | Description |
|---|---|
| Block |
BasePoint
Gets or sets the insertion base point for this layout.
Declaration
public Vector3 BasePoint { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Elevation
Gets or sets the elevation.
Declaration
public double Elevation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
IsPaperSpace
Defines if this layout is a paper space.
Declaration
public bool IsPaperSpace { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
MaxExtents
Gets or sets the maximum extents for this layout.
Declaration
public Vector3 MaxExtents { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
MaxLimit
Gets or sets the maximum limits for this layout.
Declaration
public Vector2 MaxLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
MinExtents
Gets or sets the maximum extents for this layout.
Declaration
public Vector3 MinExtents { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
MinLimit
Gets or sets the minimum limits for this layout.
Declaration
public Vector2 MinLimit { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
ModelSpace
Gets the ModelSpace layout.
Declaration
public static Layout ModelSpace { get; }
Property Value
| Type | Description |
|---|---|
| Layout |
Remarks
There can be only one model space layout and it is always called "Model".
Owner
Gets the owner of the actual layout.
Declaration
public Layouts Owner { get; }
Property Value
| Type | Description |
|---|---|
| Layouts |
PlotSettings
Gets or sets the plot settings
Declaration
public PlotSettings PlotSettings { get; set; }
Property Value
| Type | Description |
|---|---|
| PlotSettings |
TabOrder
Gets or sets the tab order.
Declaration
public short TabOrder { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int16 |
Remarks
This number is an ordinal indicating this layout's ordering in the tab control that is attached to the AutoCAD drawing frame window. Note that the "Model" tab always appears as the first tab regardless of its tab order (always zero).
UcsOrigin
Gets or sets the UCS origin.
Declaration
public Vector3 UcsOrigin { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
UcsXAxis
Gets or sets the UCS X axis.
Declaration
public Vector3 UcsXAxis { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
UcsYAxis
Gets or sets the UCS Y axis.
Declaration
public Vector3 UcsYAxis { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector3 |
Viewport
Gets the viewport associated with this layout. This is the viewport with Id 1 that represents the paper space itself, it has no graphical representation, and does not show the model.
Declaration
public Viewport Viewport { get; }
Property Value
| Type | Description |
|---|---|
| Viewport |
Remarks
The ModelSpace layout does not require a viewport and it will always return null.
Methods
| Improve this Doc View SourceClone()
Creates a new Layout that is a copy of the current instance.
Declaration
public override object Clone()
Returns
| Type | Description |
|---|---|
| System.Object | A new Layout that is a copy of this instance. |
Overrides
Remarks
The Model Layout cannot be cloned.
When cloning a PaperSpace layout the contents of the layout will not be cloned.
Clone(String)
Creates a new Layout that is a copy of the current instance.
Declaration
public override TableObject Clone(string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | newName | Layout name of the copy. |
Returns
| Type | Description |
|---|---|
| TableObject | A new Layout that is a copy of this instance. |
Overrides
Remarks
The Model Layout cannot be cloned.
When cloning a PaperSpace layout the contents of the layout will not be cloned.
CompareTo(Layout)
Compares the current object with another object of the same type.
Declaration
public int CompareTo(Layout other)
Parameters
| Type | Name | Description |
|---|---|---|
| Layout | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| System.Int32 | A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter. Zero This object is equal to other. Greater than zero This object is greater than other. |