mxcad API 文档 / McObjectId
Class: McObjectId
McObjectId类表示一个模型对象的唯一标识符。
Table of contents
Constructors
Properties
Methods
- clone
- erase
- getMcDbBlockTableRecord
- getMcDbCurve
- getMcDbCustomEntity
- getMcDbDictionary
- getMcDbDimension
- getMcDbEntity
- getMcDbLayerTableRecord
- getMcDbLinetypeTableRecord
- getMcDbObject
- getMcDbRasterImageDef
- getMcDbTextStyleTableRecord
- getMcDbXrecord
- getMxDbEntity
- getObjectName
- isErase
- isKindOf
- isNull
- isValid
- syncMcDbCustomEntity
Constructors
constructor
• new McObjectId(id?
, type?
)
创建一个McObjectId实例。
Parameters
Name | Type | Default value | Description |
---|---|---|---|
id | number | 0 | 对象的唯一标识符。 |
type | McObjectIdType | McObjectIdType.kInvalid | 对象的类型。 |
Properties
id
• id: number
type
• type: McObjectIdType
Methods
clone
▸ clone(): null
| McDbObject
Returns
null
| McDbObject
erase
▸ erase(isErase?
): void
删除对象。
Parameters
Name | Type | Default value |
---|---|---|
isErase | boolean | true |
Returns
void
getMcDbBlockTableRecord
▸ getMcDbBlockTableRecord(): null
| McDbBlockTableRecord
返回MxCAD McDbBlockTableRecord 对象。
Returns
null
| McDbBlockTableRecord
getMcDbCurve
▸ getMcDbCurve(): null
| McDbCurve
返回MxCAD McDbCurve 对象。
Returns
null
| McDbCurve
getMcDbCustomEntity
▸ getMcDbCustomEntity(): null
| McDbCustomEntity
Returns
null
| McDbCustomEntity
getMcDbDictionary
▸ getMcDbDictionary(): null
| McDbDictionary
Returns
null
| McDbDictionary
getMcDbDimension
▸ getMcDbDimension(): null
| McDbDimension
返回MxCAD McDbDimension 对象。
Returns
null
| McDbDimension
getMcDbEntity
▸ getMcDbEntity(): null
| McDbEntity
返回MxCAD McDbEntity 对象。
Returns
null
| McDbEntity
getMcDbLayerTableRecord
▸ getMcDbLayerTableRecord(): null
| McDbLayerTableRecord
返回MxCAD McDbLayerTableRecord 对象。
Returns
null
| McDbLayerTableRecord
getMcDbLinetypeTableRecord
▸ getMcDbLinetypeTableRecord(): null
| McDbLinetypeTableRecord
返回MxCAD McDbLinetypeTableRecord 对象。
Returns
null
| McDbLinetypeTableRecord
getMcDbObject
▸ getMcDbObject(): null
| McDbObject
返回MxCAD McDbObject对象。
Returns
null
| McDbObject
getMcDbRasterImageDef
▸ getMcDbRasterImageDef(): null
| McDbRasterImageDef
Returns
null
| McDbRasterImageDef
getMcDbTextStyleTableRecord
▸ getMcDbTextStyleTableRecord(): null
| McDbTextStyleTableRecord
返回MxCAD McDbTextStyleTableRecord 对象。
Returns
null
| McDbTextStyleTableRecord
getMcDbXrecord
▸ getMcDbXrecord(): null
| McDbXrecord
Returns
null
| McDbXrecord
getMxDbEntity
▸ getMxDbEntity(): null
| MxDbEntity
返回MxDraw对象。
Returns
null
| MxDbEntity
getObjectName
▸ getObjectName(): string
返回id指向的对象名称.
Returns
string
isErase
▸ isErase(): boolean
id是指向的以像,是否是删除状态.
Returns
boolean
isKindOf
▸ isKindOf(className
): boolean
判断一个对象的类型
Parameters
Name | Type |
---|---|
className | string |
Returns
boolean
isNull
▸ isNull(): boolean
id是否为NULL.
Returns
boolean
isValid
▸ isValid(): boolean
id是否有效.
Returns
boolean
syncMcDbCustomEntity
▸ syncMcDbCustomEntity(): void
Returns
void