Layer Properties

The AcDbLayerTableRecord class contains member functions for specifying a number of layer properties that affect the display of their associated entities. All entities must refer to a valid layer table record. The AutoCAD User's Guide provides a detailed description of layer properties.

The following sections list the member functions for setting and querying layer properties.

Frozen/Thawed

When a layer is frozen, graphics are not regenerated.

Acad::ErrorStatus
AcDbLayerTableRecord::setIsFrozen(bool frozen);
 
bool
AcDbLayerTableRecord::isFrozen() const;

On/Off

When a layer is OFF, graphics are not displayed.

void AcDbLayerTableRecord::setIsOff(bool off);
 
bool
AcDbLayerTableRecord::isOff() const;

Viewport

This setVPDFLT() function specifies whether the layer by default is visible or invisible in new viewports.

void AcDbLayerTableRecord::setVPDFLT(bool frozen);
 
bool 
AcDbLayerTableRecord::VPDFLT() const;

Locked/Unlocked

Entities on a locked layer cannot be modified by an AutoCAD user or opened for the write() function within a program.

void AcDbLayerTableRecord::setIsLocked(bool locked);
 
bool
AcDbLayerTableRecord::isLocked() const;

Color

The color set by the setColor() function is used when an entity's color is BYLAYER.

void AcDbLayerTableRecord::setColor(const AcCmColor & color);
 
AcCmColor 
AcDbLayerTableRecord::color() const;

Linetype

The linetype set by the setLinetypeObjectId() function is used when an entity's linetype is BYLAYER.

void AcDbLayerTableRecord::setLinetypeObjectId(AcDbObjectId id);
 
AcDbObjectId
AcDbLayerTableRecord::linetypeObjectId() const;