Show / Hide Table of Contents

Class LayerDictionary

A class that holds layers using a dictionary structure with the layer names being used as the keys.

Inheritance
System.Object
LayerDictionary
Inherited Members
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)
System.Object.ToString()
Namespace: Dxflib.AcadEntities
Assembly: Dxflib.dll
Syntax
public class LayerDictionary

Constructors

| Improve this Doc View Source

LayerDictionary()

Constructor that initializes the Layer Dictionary to an empty System.Collections.Generic.Dictionary`2

Declaration
public LayerDictionary()

Properties

| Improve this Doc View Source

Count

The number of objects in the dictionary

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

GetAllLayers

Returns all layers as a

Declaration
public List<Layer> GetAllLayers { get; }
Property Value
Type Description
System.Collections.Generic.List<Layer>

Methods

| Improve this Doc View Source

ContainsLayer(String)

Returns true or false if the layer is in this dictionary

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

The name of the layer you want to search

Returns
Type Description
System.Boolean

True: If the layer does exits, False: If the layer does not exist

| Improve this Doc View Source

GetLayer(String)

Get a Layer from the dictionary by its name

Declaration
public Layer GetLayer(string name)
Parameters
Type Name Description
System.String name

The name of the layer

Returns
Type Description
Layer

The layer that corresponds with the name that was given

| Improve this Doc View Source

NewLayer(String)

Adding a new layer to the dictionary

Declaration
public void NewLayer(string name)
Parameters
Type Name Description
System.String name

The name of the layer

Exceptions
Type Condition
LayerException

Thrown when the name is already a member of the dictionary

| Improve this Doc View Source

RemoveLayer(String)

Remove a layer by its name

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

The name of the layer that is to be removed

Returns
Type Description
System.Boolean

True: if Successful

| Improve this Doc View Source

UpdateDictionary(IEnumerable<Entity>)

Updates the dictionary. If a layer does not exist then it adds it to the dictionary and adds entities to their respective layers.

Declaration
public void UpdateDictionary(IEnumerable<Entity> entities)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Entity> entities

Entities that you want the dictionary to have

  • Improve this Doc
  • View Source
Back to top Generated by DocFX