Table of Contents

Method SetDatabaseDefaults

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

SetDatabaseDefaults(DxfDatabase)

Gives the entity the look a drawing gives new entities, as AutoCAD's SetDatabaseDefaults: the layer ($CLAYER), colour ($CECOLOR), linetype ($CELTYPE) and, in a drawing of R2000 or later, linetype scale ($CELTSCALE) and lineweight ($CELWEIGHT) of its header and, in a drawing of R2004 or later, the transparency of Cetransparency: a drawing whose CETRANSPARENCY is the alpha 100 gives a line the alpha 100, and one whose CETRANSPARENCY is by layer leaves it by layer. An R2000 drawing has no transparency to give, and leaves the entity as it was.

public void SetDatabaseDefaults(DxfDatabase database)

Parameters

database DxfDatabase

The drawing whose header gives the look.

Exceptions

ArgumentNullException

Thrown when the drawing is null.

ArgumentException

Thrown when the look cannot be held by the entity, as its setters say.

InvalidOperationException

Thrown when the entity is erased.

SetDatabaseDefaults()

Gives the entity the look of the drawing it is in, as AutoCAD's SetDatabaseDefaults() gives one that of its database, as SetDatabaseDefaults(DxfDatabase) says. AutoCAD gives an entity in no database the look of the drawing open in its window; an entity made in code is in no drawing until it is appended, so it is refused.

public void SetDatabaseDefaults()

Exceptions

ArgumentException

Thrown when the look cannot be held by the entity, as its setters say.

InvalidOperationException

Thrown when the entity is in no drawing, or is erased.