Skip to content
On this page

[mxcad_2d API documentation] (../README. md)/[2d] (../modules/2d. md)/McDbdDimStyleTableRecord

Class: McDbDimStyleTableRecord

2d.McDbDimStyleTableRecord

Represents a annotation style record object that implements attribute related operation functions for annotation styles.

Example

ts

Hierarchy

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new McDbDimStyleTableRecord(imp?)

Constructor.

Example

ts

Parameters

NameTypeDescription
imp?AnyInternal implementation object

Overrides

McDbObject.constructor

Properties

imp

imp: any = 0

Internal implementation object.

Inherited from

McDbObject.imp

Accessors

dxf0

get dxf0(): string

Obtain the type name of the object's DXF group code, which is the same as the DXF group code in AutoCAD. For example, the type name of the line is McDbLine, and the group code value for DXF0 is: LINE and DXF0 group code values can be used for type filtering when constructing sets.

Returns

string

Inherited from

McDbObject.dxf0


name

get name(): string

Get or set the annotation style name.

Example

ts

Returns

string

set name(val): void

Parameters

NameType
valstring

Returns

void


objectName

get objectName(): string

Get the object name.

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
console.log(obj.objectName);

Returns

string

Return object name

Inherited from

McDbObject.objectName

Methods

assertObjectModification

assertObjectModification(autoUndo?): number

Setting the state of the object to be changed can automatically trigger the update display function to update the display. For example, if the block table record is updated and the block reference needs to be notified to update the display, this function can be called.

Example

ts
//Assuming obj is a database object
obj.assertObjectModification()

Parameters

NameTypeDefault value
autoUndobooleanfalse

Returns

number

Inherited from

McDbObject.assertObjectModification


clone

clone(): null | McDbObject

Clone objects.

Example

ts
//Assuming obj is a database object
const obj_clone = obj.clone();

Returns

null | McDbObject

The cloned object.

Inherited from

McDbObject.clone


createExtensionDictionary

createExtensionDictionary(): boolean

Create extended dictionary data for objects

Example

ts
//Assuming obj is a database object
const res = obj.createExtensionDictionary();

Returns

boolean

Inherited from

McDbObject.createExtensionDictionary


erase

erase(): boolean

Delete object.

Example

ts
//Assuming obj is a database object
const res = obj.erase();
console.log(res);

Returns

boolean

Whether the deletion was successful.

Inherited from

McDbObject.erase


getDatabase

getDatabase(): McDbDatabase

Get the database where the object is located

Example

ts
//Assuming obj is a database object
const data = obj.getDatabase();

Returns

McDbDatabase

Return to database

Inherited from

McDbObject.getDatabase


getDatabaseIndexId

getDatabaseIndexId(): number

Get the index ID of the object

Example

ts
//Assuming obj is a database object
const id = obj.getDatabaseIndexId();

Returns

number

Inherited from

McDbObject.getDatabaseIndexId


getDimVarDouble

getDimVarDouble(type): number

Obtain the double type property of the annotation style.

Example

ts

Parameters

NameType
typenumber

Returns

number


getDimVarInt

getDimVarInt(type): number

Obtain integer type properties for annotation styles.

Example

ts

Parameters

NameType
typenumber

Returns

number


getDimVarObjectId

getDimVarObjectId(type): McObjectId

Obtain integer type properties for annotation styles.

Example

ts

Parameters

NameType
typenumber

Returns

McObjectId


getDimVarString

getDimVarString(type): string

Obtain the string type attribute of the annotation style.

Example

ts

Parameters

NameType
typenumber

Returns

string


getExtensionDictionary

getExtensionDictionary(): McDbDictionary

Obtain the extended dictionary data of the object

Example

ts
//Assuming obj is a database object
const id = obj.getOwnerID();

Returns

McDbDictionary

Expand dictionary data

Inherited from

McDbObject.getExtensionDictionary


getGripPoints

getGripPoints(): McGePoint3dArray

Get the control points of the object

Example

ts
//Assuming obj is a database object
const ptArr = obj.getGripPoints();

Returns

McGePoint3dArray

Inherited from

McDbObject.getGripPoints


getHandle

getHandle(): string

Obtain object handle

Example

ts
//Assuming obj is a database object
const handle = obj.getHandle();

Returns

string

Return object handle

Inherited from

McDbObject.getHandle


getImp

getImp(): any

Retrieve internal implementation objects.

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
let imp = obj.getImp();

Returns

any

Internal implementation object.

Inherited from

McDbObject.getImp


getJson

getJson(): string

Retrieve a string in JSON format.

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
const json = obj.getJson()

Returns

string

A string in JSON format.

Inherited from

McDbObject.getJson


getObjectID

getObjectID(): McObjectId

Get the object ID.

Example

ts
import { McDbObject } from "mxcad";
const id = obj.getObjectID();

Returns

McObjectId

Object ID.

Inherited from

McDbObject.getObjectID


getOwnerID

getOwnerID(): number

Obtain the ID of the object owner

Example

ts
//Assuming obj is a database object
const id = obj.getOwnerID();

Returns

number

Inherited from

McDbObject.getOwnerID


initTempObject

initTempObject(imp): void

Initialize temporary objects.

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
obj.initTempObject()

Parameters

NameTypeDescription
'imp''any'Internal implementation object

Returns

void

Inherited from

McDbObject.initTempObject


isErased

isErased(): boolean

Has the object been deleted

Example

ts
//Assuming obj is a database object
const res = obj.isErased();
console.log(res);

Returns

boolean

Inherited from

McDbObject.isErased


isHaveExtensionDictionary

isHaveExtensionDictionary(): boolean

Is there any extended dictionary data available

Example

ts
//Assuming obj is a database object
const res = obj.isHaveExtensionDictionary();

Returns

boolean

Inherited from

McDbObject.isHaveExtensionDictionary


isKindOf

isKindOf(sObjectName): boolean

Determine object type

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
let isKind = obj.isKindOf('SomeObjectType');
console.log(isKind); //  Output: True or false

Parameters

NameTypeDescription
SOrtNamestringType Name

Returns

boolean

Return whether the object is of the target type

Inherited from

McDbObject.isKindOf


isNull

isNull(): any

Determine if it is an empty object

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
console.log(obj.isNull()); //  Output: True or false

Returns

any

Inherited from

McDbObject.isNull


moveGripPointsAt

moveGripPointsAt(iIndex, dXOffset, dYOffset, dZOffset): any

Control points for moving objects

Example

ts
//Assuming obj is a database object
obj.moveGripPointsAt(1,10,10,10);

Parameters

NameTypeDescription
IIndexNumberIndex
DXOffsetnumberX-axis offset
DYOffsetnumberY-axis offset
DZOffsetnumberZ-axis offset

Returns

any

Inherited from

McDbObject.moveGripPointsAt


setDimVarDouble

setDimVarDouble(type, value): boolean

Set the double type property of the annotation style.

Example

ts

Parameters

NameType
typenumber
valuenumber

Returns

boolean


setDimVarInt

setDimVarInt(type, value): boolean

Set integer type properties for annotation styles.

Example

ts

Parameters

NameType
typenumber
valuenumber

Returns

boolean


setDimVarObjectId

setDimVarObjectId(type, value): boolean

Set integer type properties for annotation styles.

Example

ts

Parameters

NameType
typenumber
valueMcObjectId

Returns

boolean


setDimVarString

setDimVarString(type, value): boolean

Set string type properties for annotation styles.

Example

ts

Parameters

NameType
typenumber
valuestring

Returns

boolean


setJson

setJson(str): boolean

Set a string in JSON format.

Example

ts
import { McRxObject } from 'mxcad';

let obj = new McRxObject();
const res = obj.setJson('{"key": "value"}');
console.log(res)

Parameters

NameTypeDescription
StrstringJSON formatted string

Returns

boolean

Is the setting successful.

Inherited from

McDbObject.setJson


unErase

unErase(): boolean

Anti delete object.

Example

ts
//Assuming obj is a database object
const res = obj.unErase();
console.log(res);

Returns

boolean

Inherited from

McDbObject.unErase