Skip to content

Latest commit

 

History

History
425 lines (203 loc) · 5.53 KB

File metadata and controls

425 lines (203 loc) · 5.53 KB

PCB_SelectControl class

PCB & 封装 / 选择控制类

Signature

declare class PCB_SelectControl 

Remarks

获取或操作选择的元素

Methods

Method

Modifiers

Description

clearSelected()

(BETA) 清除选中

doCrossProbeSelect(components, pins, nets, highlight, select)

(BETA) 进行交叉选择

doSelectPrimitives(primitiveIds)

(BETA) 使用图元 ID 选中图元

getAllSelectedPrimitives_PrimitiveId()

(BETA) 查询所有已选中图元的图元 ID

getAllSelectedPrimitives()

(BETA) 查询所有已选中图元的图元对象

getCurrentMousePosition()

(BETA) 获取当前鼠标在画布上的位置

getSelectedPrimitives()

(BETA) 查询选中图元的所有参数


方法详情

clearselected

PCB_SelectControl.clearSelected() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

清除选中

Signature

clearSelected(): Promise<boolean>;

Returns

Promise<boolean>

操作是否成功

docrossprobeselect

PCB_SelectControl.doCrossProbeSelect() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

进行交叉选择

Signature

doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): Promise<boolean>;

Parameters

Parameter

Type

Description

components

Array<string>

(Optional) 器件位号

pins

Array<string>

(Optional) 器件位号_引脚编号,格式为 ['U1_1', 'U1_2']

nets

Array<string>

(Optional) 网络名称

highlight

boolean

(Optional) 是否高亮

select

boolean

(Optional) 操作是否成功

Returns

Promise<boolean>

doselectprimitives

PCB_SelectControl.doSelectPrimitives() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

使用图元 ID 选中图元

Signature

doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;

Parameters

Parameter

Type

Description

primitiveIds

string | Array<string>

图元 ID

Returns

Promise<boolean>

操作是否成功

getallselectedprimitives

PCB_SelectControl.getAllSelectedPrimitives() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

查询所有已选中图元的图元对象

Signature

getAllSelectedPrimitives(): Promise<Array<IPCB_Primitive>>;

Returns

Promise<Array<IPCB_Primitive>>

所有已选中图元的图元对象

getallselectedprimitives_primitiveid

PCB_SelectControl.getAllSelectedPrimitives_PrimitiveId() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

查询所有已选中图元的图元 ID

Signature

getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;

Returns

Promise<Array<string>>

所有已选中图元的图元 ID

getcurrentmouseposition

PCB_SelectControl.getCurrentMousePosition() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

获取当前鼠标在画布上的位置

Signature

getCurrentMousePosition(): Promise<{
        x: number;
        y: number;
    } | undefined>;

Returns

Promise<{ x: number; y: number; } | undefined>

鼠标在画布上的位置,undefined 代表当前鼠标不在画布上

getselectedprimitives

PCB_SelectControl.getSelectedPrimitives() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Warning: This API is now obsolete.

请使用 getAllSelectedPrimitives 替代

查询选中图元的所有参数

Signature

getSelectedPrimitives(): Promise<Array<Object>>;

Returns

Promise<Array<Object>>

选中图元的所有参数