---
title: Class: DbEntity
source: https://vjmap.com/doc/Class_DbEntity.html
---

# Class: DbEntity

[default](#modulesdefaultmd).DbEntity

`DbEntity` 实体基类.

### Hierarchy

- **DbEntity**

  ↳ [*DbLine*](#classesdefaultdblinemd)

  ↳ [*DbCurve*](#classesdefaultdbcurvemd)

  ↳ [*DbBlockReference*](#classesdefaultdbblockreferencemd)

  ↳ [*DbHatch*](#classesdefaultdbhatchmd)

  ↳ [*DbText*](#classesdefaultdbtextmd)

  ↳ [*DbMText*](#classesdefaultdbmtextmd)

  ↳ [*DbShape*](#classesdefaultdbshapemd)

  ↳ [*DbRasterImage*](#classesdefaultdbrasterimagemd)

  ↳ [*DbMLeader*](#classesdefaultdbmleadermd)

  ↳ [*DbDimension*](#classesdefaultdbdimensionmd)

  ↳ [*DbLine*](#classesdblinemd)

  ↳ [*DbCurve*](#classesdbcurvemd)

  ↳ [*DbBlockReference*](#classesdbblockreferencemd)

  ↳ [*DbHatch*](#classesdbhatchmd)

  ↳ [*DbText*](#classesdbtextmd)

  ↳ [*DbMText*](#classesdbmtextmd)

  ↳ [*DbShape*](#classesdbshapemd)

  ↳ [*DbRasterImage*](#classesdbrasterimagemd)

  ↳ [*DbMLeader*](#classesdbmleadermd)

  ↳ [*DbDimension*](#classesdbdimensionmd)

### Implements

- [*IDbEntity*](#interfacesdefaultidbentitymd)

### Table of contents

#### Constructors

- [constructor](#constructor)

#### Properties

- [alpha](#alpha)
- [cloneFromDb](#clonefromdb)
- [cloneObjectId](#cloneobjectid)
- [color](#color)
- [colorIndex](#colorindex)
- [layer](#layer)
- [lineWidth](#linewidth)
- [linetype](#linetype)
- [linetypeScale](#linetypescale)
- [matrix](#matrix)
- [typename](#typename)
- [visibility](#visibility)
- [xdata](#xdata)

### Constructors

#### constructor

\+ `Protected` **new DbEntity**(`prop?`: [*IDbEntity*](#interfacesdefaultidbentitymd)): [*DbEntity*](#classesdefaultdbentitymd)

构造函数

##### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `prop` | [*IDbEntity*](#interfacesdefaultidbentitymd) | {} |

**Returns:** [*DbEntity*](#classesdefaultdbentitymd)

### Properties

#### alpha

• `Optional` **alpha**: *number*

透明度. [0-255][0完全透明,255完全不透明]

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[alpha](#alpha)

___

#### cloneFromDb

• `Optional` **cloneFromDb**: *string*

克隆的实体ID来源的图形，如为空，则取DbDocument中from的图形。也可以指定另外的图形

___

#### cloneObjectId

• `Optional` **cloneObjectId**: *string*

克隆的实体ID，DbDocument有from图形来源字段时有效.

___

#### color

• `Optional` **color**: *number*

颜色.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[color](#color)

___

#### colorIndex

• `Optional` **colorIndex**: *number*

颜色索引. 0 随块. 1 Red.  2 Yellow. 3   Green.  4 Cyan.  5  Blue. 6   Magenta. 256 表示随层

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[colorIndex](#colorindex)

___

#### layer

• `Optional` **layer**: *string*

图层.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[layer](#layer)

___

#### lineWidth

• `Optional` **lineWidth**: *number*

线宽.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[lineWidth](#linewidth)

___

#### linetype

• `Optional` **linetype**: *string*

线型.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[linetype](#linetype)

___

#### linetypeScale

• `Optional` **linetypeScale**: *number*

线型比例.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[linetypeScale](#linetypescale)

___

#### matrix

• `Optional` **matrix**: [*IDbMatrixOp*](#interfacesdefaultidbmatrixopmd)[]

矩阵.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[matrix](#matrix)

___

#### typename

• `Optional` **typename**: *string*

类型.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[typename](#typename)

___

#### visibility

• `Optional` **visibility**: *boolean*

可见.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[visibility](#visibility)

___

#### xdata

• `Optional` **xdata**: *string*

扩展数据.

Implementation of: [IDbEntity](#interfacesdefaultidbentitymd).[xdata](#xdata)


<a name="classesdefaultdbhatchmd"></a>

[vjmap](#readmemd) / [Exports](#modulesmd) / [default](#modulesdefaultmd) / DbHatch
