Table of Contents

Method SetColor

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

SetColor(CadDocument, string, string, DxfColor)

Overrides a layer's colour in a viewport, as the VP Color column: one of the index or a true colour; ByLayer and ByBlock refused.

public static CadEditResult SetColor(CadDocument document, string viewport, string layer, DxfColor color)

Parameters

document CadDocument

The document.

viewport string

The handle of the viewport.

layer string

The name of the layer.

color DxfColor

The colour.

Returns

CadEditResult

What came of it.

Exceptions

ArgumentNullException

Thrown when the document is null.