Show / Hide Table of Contents

Class Layouts

Represents a collection of layouts.

Inheritance
System.Object
DxfObject
TableObjects<Layout>
Layouts
Implements
System.Collections.Generic.IEnumerable<Layout>
System.Collections.IEnumerable
Inherited Members
TableObjects<Layout>.list
TableObjects<Layout>.references
TableObjects<Layout>.Item[String]
TableObjects<Layout>.Items
TableObjects<Layout>.Names
TableObjects<Layout>.Count
TableObjects<Layout>.MaxCapacity
TableObjects<Layout>.Owner
TableObjects<Layout>.Contains(String)
TableObjects<Layout>.Contains(Layout)
TableObjects<Layout>.TryGetValue(String, Layout)
TableObjects<Layout>.Add(Layout)
TableObjects<Layout>.Clear()
TableObjects<Layout>.GetEnumerator()
TableObjects<Layout>.IEnumerable.GetEnumerator()
DxfObject.CodeName
DxfObject.Handle
DxfObject.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: netDxf.Collections
Assembly: CADability.dll
Syntax
public sealed class Layouts : TableObjects<Layout>, IEnumerable<Layout>, IEnumerable
Remarks

AutoCad limits the number of layouts to 256, but at the same time it allows to import DXF files with more than that, for this reason the max capacity has been set to short.MaxValue. The maximum number of layouts is also limited by the number of blocks, due to that for each layout a block record must exist in the blocks collection.

Methods

| Improve this Doc View Source

GetReferences(Layout)

Gets the DxfObject referenced by a T.

Declaration
public List<DxfObject> GetReferences(Layout item)
Parameters
Type Name Description
Layout item

Table object.

Returns
Type Description
System.Collections.Generic.List<DxfObject>

The list of DxfObjects that reference the specified table object.

Remarks

If there is no table object with the specified name in the list the method an empty list.
The Groups collection method GetReferences will always return an empty list since there are no DxfObjects that references them.

| Improve this Doc View Source

GetReferences(String)

Gets the DxfObject referenced by a T.

Declaration
public List<DxfObject> GetReferences(string name)
Parameters
Type Name Description
System.String name

Table object name.

Returns
Type Description
System.Collections.Generic.List<DxfObject>

The list of DxfObjects that reference the specified table object.

Remarks

If there is no table object with the specified name in the list the method an empty list.
The Groups collection method GetReferences will always return an empty list since there are no DxfObjects that references them.

| Improve this Doc View Source

Remove(Layout)

Deletes a layout and removes the layout entities from the document.

Declaration
public override bool Remove(Layout item)
Parameters
Type Name Description
Layout item

Layout to remove from the document.

Returns
Type Description
System.Boolean

True if the layout has been successfully removed, or false otherwise.

Overrides
netDxf.Collections.TableObjects<netDxf.Objects.Layout>.Remove(netDxf.Objects.Layout)
Remarks

Reserved layouts or any other referenced by objects cannot be removed.

| Improve this Doc View Source

Remove(String)

Deletes a layout and removes the layout entities from the document.

Declaration
public override bool Remove(string name)
Parameters
Type Name Description
System.String name

Layout name to remove from the document.

Returns
Type Description
System.Boolean

True if the layout has been successfully removed, or false otherwise.

Overrides
netDxf.Collections.TableObjects<netDxf.Objects.Layout>.Remove(System.String)
Remarks

The ModelSpace layout cannot be removed. If all PaperSpace layouts have been removed a default PaperSpace will be created since it is required by the DXF implementation.
When a Layout is deleted all entities that has been added to it will also be removed.
Removing a Layout will rebuild the PaperSpace block names, to follow the naming rule: Paper_Space, Paper_Space0, Paper_Space1, ...

Implements

System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX