# Class: DbDocument
default.DbDocument
DbDocument 地图数据库文档.
# Table of contents
# Constructors
# Properties
- blocks
- dimStyles
- entitys
- environment
- from
- isClearFromDb
- isRenameBlockNameIfExist
- layers
- linetypes
- pickEntitys
- pickExpr
- pickLayers
- textStyles
# Methods
# Constructors
# constructor
+ new DbDocument(prop?: IDbDocument): DbDocument
构造函数
# Parameters
| Name | Type | Default value |
|---|---|---|
prop | IDbDocument | {} |
Returns: DbDocument
# Properties
# blocks
• Optional blocks: IDbBlock[]
块定义.
# dimStyles
• Optional dimStyles: IDbDimStyle[]
标注样式.
# entitys
• Optional entitys: IDbEntity[]
实体集.
# environment
• Optional environment: Record<string, any>
文档环境,用于设置是否显示线宽等设置, 设置线宽为 LWDISPLAY ,true显示或 false不显示线宽
# from
• Optional from: string
来源于哪个图,会在此图的上面进行修改或新增删除,格式如 形式为 mapid/version,如 exam/v1 .
# isClearFromDb
• Optional isClearFromDb: boolean
# isRenameBlockNameIfExist
• Optional isRenameBlockNameIfExist: boolean
来源于其他图的实体时,如果块定义重复,则自动重命名 ,默认true
# layers
• Optional layers: IDbLayer[]
图层集.
# linetypes
• Optional linetypes: IDbLinetype[]
线型.
# pickEntitys
• Optional pickEntitys: string[]
来源于哪个图时有效,表示从此图中选择指定的实体ID,不在指定的实体ID将不会显示
# pickExpr
• Optional pickExpr: string
来源于哪个图时有效,使用表达式,表示从此图中选择指定的实体ID,不在指定的实体ID将不会显示 结果与pickEntitys的取并
# pickLayers
• Optional pickLayers: string[]
来源于哪个图时有效,表示从此图中选择指定的图层,不在指定的图层将不会显示
# textStyles
• Optional textStyles: IDbTextStyle[]
文字样式.
# Methods
# appendBlock
▸ appendBlock(block: IDbBlock | IDbBlock[]): void
增加块
# Parameters
| Name | Type |
|---|---|
block | IDbBlock | IDbBlock[] |
Returns: void
# appendDimStyle
▸ appendDimStyle(dimStyle: IDbDimStyle | IDbDimStyle[]): void
增加标注样式
# Parameters
| Name | Type |
|---|---|
dimStyle | IDbDimStyle | IDbDimStyle[] |
Returns: void
# appendEntity
▸ appendEntity(entity: IDbEntity | IDbEntity[]): void
增加实体
# Parameters
| Name | Type |
|---|---|
entity | IDbEntity | IDbEntity[] |
Returns: void
# appendLayer
▸ appendLayer(layer: IDbLayer | IDbLayer[]): void
增加图层
# Parameters
| Name | Type |
|---|---|
layer | IDbLayer | IDbLayer[] |
Returns: void
# appendLinetype
▸ appendLinetype(linetype: IDbLinetype | IDbLinetype[]): void
增加线型
# Parameters
| Name | Type |
|---|---|
linetype | IDbLinetype | IDbLinetype[] |
Returns: void
# appendTextStyle
▸ appendTextStyle(textStyle: IDbTextStyle | IDbTextStyle[]): void
增加样式样式
# Parameters
| Name | Type |
|---|---|
textStyle | IDbTextStyle | IDbTextStyle[] |
Returns: void
# toDoc
▸ toDoc(content?: string): string
转成文档字符串
# Parameters
| Name | Type | Description |
|---|---|---|
content? | string | 如果传入了内容,则以content为主。json格式 |
Returns: string