Skip to content
On this page

mxcad_2d API 文档 / 2d / MxCppType

Class: MxCppType

2d.MxCppType

MxCppType 类封装了一系列与 CAD 相关的操作,包括创建点、向量、获取当前对象等

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new MxCppType()

Properties

Ai

Ai: MxAI

Mx AI实例


App

App: McAppType

McAppType 实例


PropertiesWindow

PropertiesWindow: MxPropertiesWindowCustom

PropertiesWindow 属必窗口功能调用实例


mxcadassemblyimp

Optional mxcadassemblyimp: any

MxCpp 程序集

Methods

decodeFromGb2312

decodeFromGb2312(strHex): string

把hex格式的Gb2312编码的转成utf8

Parameters

NameType
strHexstring

Returns

string


encodeToGb2312

encodeToGb2312(str): string

把utf8转成hex格式的Gb2312编码

Parameters

NameType
strstring

Returns

string


getCallResult

getCallResult(): number

获取上一次调用的结果

Returns

number

调用结果


getCurrentDatabase

getCurrentDatabase(): McDbDatabase

返回当前活动的CAD对象的数据库对象.

Returns

McDbDatabase


getCurrentMxCAD

getCurrentMxCAD(): McObject

返回当前活动的CAD对象

Returns

McObject


newMcGePoint3d

newMcGePoint3d(pt?): McGePoint3d

创建新的 McGePoint3d 实例

Parameters

NameTypeDescription
pt?any点坐标

Returns

McGePoint3d

McGePoint3d 实例


newMcGeVector3d

newMcGeVector3d(pt?): McGeVector3d

创建新的 McGeVector3d 实例

Parameters

NameTypeDescription
pt?any点坐标

Returns

McGeVector3d

McGePoint3d 实例