Table of Contents

Class CadRemoteLayer

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

A layer of a drawing of a running OpenCAD2D, as the Layer manager lists it: its name and how it looks. One read from Layers is a copy; change it and give it to ModifyLayer(CadRemoteLayer) to write the changes, or make a new one and give it to AddLayer(CadRemoteLayer).

public sealed class CadRemoteLayer
Inheritance
CadRemoteLayer
Inherited Members

Examples

var steel = new CadRemoteLayer("Steel") { Color = DxfColor.FromColorIndex(DxfColorMethod.ByAci, 1) };
drawing.AddLayer(steel);
drawing.Insert(new DxfLine(new GeoPoint3(0, 0, 0), new GeoPoint3(1000, 0, 0)) { Layer = "Steel" });
drawing.CommitChanges();

Remarks

A layer made in code is on, thawed, unlocked and plotted, white (index 7), with the linetype Continuous, the default lineweight and no description, as AutoCAD's New layer makes one.

Constructors

CadRemoteLayer(string)

Makes a layer to add to a drawing.

Properties

Color

Gets or sets the colour of the layer: an AutoCAD colour index from 1 to 255, or a true colour (FromRgb(byte, byte, byte)).

Description

Gets or sets the description of the layer, as the Layer manager shows it; empty for none.

IsFrozen

Gets or sets whether the layer is frozen: a frozen layer's objects are not drawn, and the app refuses to freeze the current layer.

IsLocked

Gets or sets whether the layer is locked: its objects are drawn and the user cannot change them.

IsOn

Gets or sets whether the layer is on: an off layer's objects are not drawn.

IsPlottable

Gets or sets whether the layer is plotted.

LineWeight

Gets or sets the lineweight of the layer: ByLineWeightDefault until set. The drawing refuses a weight AutoCAD has none of, and one by layer or by block.

Linetype

Gets or sets the name of the layer's linetype; Continuous until set. The drawing refuses a linetype it does not list.

Name

Gets the name of the layer.

Methods

ToString()