mxcad API 文档 / MxCADUiPrKeyWord
Class: MxCADUiPrKeyWord
UI交互 根据用户输入得到关键词
Example
import { MxCADUiPrKeyWord } from 'mxcad'
const getKey = new MxCADUiPrKeyWord
getKey.setMessage("提示用户关键词 A、 B、 C:")
getKey.setKeyWords("A B C")
const keyVal = await getKey.go()
console.log(keyVal)
Hierarchy
↳
MxCADUiPrKeyWord
Table of contents
Constructors
Properties
Methods
- abort
- cad2doc1
- cad2doc2
- clearLastInputPoint
- disableAllTrace
- doc2cad1
- doc2cad2
- drawReserve
- getCursorType
- getDetailedResult
- getDynamicInputType
- getInputToucheType
- getStatus
- go
- isDisableDynInput
- isDisableDynamicTrace
- isDisableGridTrace
- isDisableOrthoTrace
- isDisableOsnap
- isDisablePolarAxisTrace
- isKeyWordPicked
- keyWordPicked
- keyWords
- message
- setCursorType
- setDisableDynInput
- setDisableDynamicTrace
- setDisableGridTrace
- setDisableOrthoTrace
- setDisableOsnap
- setDisablePolarAxisTrace
- setDynamicInputType
- setInputToucheType
- setKeyWords
- setLastInputPoint
- setMessage
- setUserDraw
- setUserInputControls
- userInputControls
Constructors
constructor
• new MxCADUiPrKeyWord()
Overrides
Properties
imp
• Protected
imp: any
Inherited from
mxobj
• Protected
mxobj: MxDrawObject
Inherited from
Methods
abort
▸ abort(cause?
): void
停止当前动态拖动
Parameters
Name | Type | Default value |
---|---|---|
cause | DetailedResult | DetailedResult.kCodeAbort |
Returns
void
void
Inherited from
cad2doc1
▸ Protected
cad2doc1(pt
): Vector3
Parameters
Name | Type |
---|---|
pt | McGePoint3d |
Returns
Vector3
Inherited from
cad2doc2
▸ Protected
cad2doc2(x
, y
, z
): Vector3
Parameters
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns
Vector3
Inherited from
clearLastInputPoint
▸ clearLastInputPoint(): void
清除上一次的输入点数据。
Returns
void
选择的关键字
Inherited from
MxCADUiPrBase.clearLastInputPoint
disableAllTrace
▸ disableAllTrace(isDisable?
): void
禁用所有跟踪
Parameters
Name | Type | Default value |
---|---|---|
isDisable | boolean | true |
Returns
void
Inherited from
doc2cad1
▸ Protected
doc2cad1(pt
): McGePoint3d
Parameters
Name | Type |
---|---|
pt | Vector3 |
Returns
Inherited from
doc2cad2
▸ Protected
doc2cad2(x
, y
, z
): McGePoint3d
Parameters
Name | Type |
---|---|
x | number |
y | number |
z | number |
Returns
Inherited from
drawReserve
▸ drawReserve(callAddEntity?
): void
把动态绘制的对象,保留到图上。
Parameters
Name | Type | Description |
---|---|---|
callAddEntity? | (ent : Object3D ) => void | 回调参数ent 类型:THREE.THREE.Object3D |
Returns
void
点对象 DWG图纸坐标
Inherited from
getCursorType
▸ getCursorType(): MxCursorType
返回光标类型
Returns
MxCursorType
Inherited from
getDetailedResult
▸ getDetailedResult(): DetailedResult
返回交互操作退出的详细原因
Returns
DetailedResult
Inherited from
MxCADUiPrBase.getDetailedResult
getDynamicInputType
▸ getDynamicInputType(): DynamicInputType
返回动态输入类型
Returns
DynamicInputType
Inherited from
MxCADUiPrBase.getDynamicInputType
getInputToucheType
▸ getInputToucheType(): number
返回需要的Touche输入类型
Returns
number
Inherited from
MxCADUiPrBase.getInputToucheType
getStatus
▸ getStatus(): MrxDbgUiPrBaseReturn
Returns
MrxDbgUiPrBaseReturn
Inherited from
go
▸ go(): Promise
<null
| string
>
开始动态拖动
Returns
Promise
<null
| string
>
void
isDisableDynInput
▸ isDisableDynInput(): boolean
是否禁用动态输入框
Returns
boolean
Inherited from
MxCADUiPrBase.isDisableDynInput
isDisableDynamicTrace
▸ isDisableDynamicTrace(): boolean
是否禁用动态跟踪
Returns
boolean
Inherited from
MxCADUiPrBase.isDisableDynamicTrace
isDisableGridTrace
▸ isDisableGridTrace(): boolean
是否禁用格网追踪
Returns
boolean
Inherited from
MxCADUiPrBase.isDisableGridTrace
isDisableOrthoTrace
▸ isDisableOrthoTrace(): boolean
是否禁用正射追踪
Returns
boolean
Inherited from
MxCADUiPrBase.isDisableOrthoTrace
isDisableOsnap
▸ isDisableOsnap(): boolean
是否禁用捕捉
Returns
boolean
Inherited from
isDisablePolarAxisTrace
▸ isDisablePolarAxisTrace(): boolean
是否禁用极轴跟踪
Returns
boolean
Inherited from
MxCADUiPrBase.isDisablePolarAxisTrace
isKeyWordPicked
▸ isKeyWordPicked(matchKeyWord
): boolean
测试某一个关键字是否被用户选择
Parameters
Name | Type | Description |
---|---|---|
matchKeyWord | string | 要检测的关键字 |
Returns
boolean
true为真
Inherited from
keyWordPicked
▸ keyWordPicked(): string
返回用户选择的关键字
Returns
string
选择的关键字
Inherited from
keyWords
▸ keyWords(): string
返回关键字列表
Returns
string
关键词列表
Inherited from
message
▸ message(): string
提示字符串
Returns
string
提示消息
Inherited from
setCursorType
▸ setCursorType(type
): void
设置光标类型
Parameters
Name | Type |
---|---|
type | MxCursorType |
Returns
void
Inherited from
setDisableDynInput
▸ setDisableDynInput(isDisable
): void
设置是否禁用动态输入框
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
MxCADUiPrBase.setDisableDynInput
setDisableDynamicTrace
▸ setDisableDynamicTrace(isDisable
): void
设置是否禁用动态跟踪
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
MxCADUiPrBase.setDisableDynamicTrace
setDisableGridTrace
▸ setDisableGridTrace(isDisable
): void
设置是否禁用格网追踪
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
MxCADUiPrBase.setDisableGridTrace
setDisableOrthoTrace
▸ setDisableOrthoTrace(isDisable
): void
设置是否禁用正射追踪
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
MxCADUiPrBase.setDisableOrthoTrace
setDisableOsnap
▸ setDisableOsnap(isDisable
): void
设置是否禁用捕捉
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
setDisablePolarAxisTrace
▸ setDisablePolarAxisTrace(isDisable
): void
设置是否禁用极轴跟踪
Parameters
Name | Type |
---|---|
isDisable | boolean |
Returns
void
Inherited from
MxCADUiPrBase.setDisablePolarAxisTrace
setDynamicInputType
▸ setDynamicInputType(type
): void
设置动态输入类型
Parameters
Name | Type |
---|---|
type | DynamicInputType |
Returns
void
Inherited from
MxCADUiPrBase.setDynamicInputType
setInputToucheType
▸ setInputToucheType(toucheType
): void
设置需要的Touche输入类型,默认值是 MxType.InputToucheType.kGetBegan
Parameters
Name | Type |
---|---|
toucheType | number |
Returns
void
Inherited from
MxCADUiPrBase.setInputToucheType
setKeyWords
▸ setKeyWords(keyWordList
): void
设置关键字列表
Parameters
Name | Type | Description |
---|---|---|
keyWordList | string | 关键词列表 |
Returns
void
void
Inherited from
setLastInputPoint
▸ setLastInputPoint(pt
): void
设置上一次的输入点。
Parameters
Name | Type |
---|---|
pt | McGePoint3d |
Returns
void
选择的关键字
Inherited from
MxCADUiPrBase.setLastInputPoint
setMessage
▸ setMessage(message
): void
设置提示字符串
Parameters
Name | Type | Description |
---|---|---|
message | string | 提示消息 |
Returns
void
提示消息
Inherited from
setUserDraw
▸ setUserDraw(pDraw
): void
设置交互过程的动态绘制调用对象
Parameters
Name | Type | Description |
---|---|---|
pDraw | (currentPoint : McGePoint3d , pWorldDraw : McEdGetPointWorldDrawObject ) => void | McEdGetPointWorldDrawObject | 动态绘制调用对象 |
Returns
void
void
Inherited from
setUserInputControls
▸ setUserInputControls(contros
): void
设置输入控制设置,UserInputControls
Parameters
Name | Type |
---|---|
contros | number |
Returns
void
Inherited from
MxCADUiPrBase.setUserInputControls
userInputControls
▸ userInputControls(): number
返回输入控制设置,UserInputControls
Returns
number