PCB & 封装 / 选择控制类
declare class PCB_SelectControl 获取或操作选择的元素
|
Method |
Modifiers |
Description |
|---|---|---|
|
(BETA) 清除选中 | ||
|
doCrossProbeSelect(components, pins, nets, highlight, select) |
(BETA) 进行交叉选择 | |
|
(BETA) 使用图元 ID 选中图元 | ||
|
(BETA) 查询所有已选中图元的图元 ID | ||
|
(BETA) 查询所有已选中图元的图元对象 | ||
|
(BETA) 获取当前鼠标在画布上的位置 | ||
|
(BETA) 查询选中图元的所有参数 |
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.
清除选中
clearSelected(): Promise<boolean>;Promise<boolean>
操作是否成功
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.
进行交叉选择
doCrossProbeSelect(components?: Array<string>, pins?: Array<string>, nets?: Array<string>, highlight?: boolean, select?: boolean): Promise<boolean>;|
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) 操作是否成功 |
Promise<boolean>
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 选中图元
doSelectPrimitives(primitiveIds: string | Array<string>): Promise<boolean>;|
Parameter |
Type |
Description |
|---|---|---|
|
primitiveIds |
string | Array<string> |
图元 ID |
Promise<boolean>
操作是否成功
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.
查询所有已选中图元的图元对象
getAllSelectedPrimitives(): Promise<Array<IPCB_Primitive>>;Promise<Array<IPCB_Primitive>>
所有已选中图元的图元对象
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
getAllSelectedPrimitives_PrimitiveId(): Promise<Array<string>>;Promise<Array<string>>
所有已选中图元的图元 ID
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.
获取当前鼠标在画布上的位置
getCurrentMousePosition(): Promise<{
x: number;
y: number;
} | undefined>;Promise<{ x: number; y: number; } | undefined>
鼠标在画布上的位置,undefined 代表当前鼠标不在画布上
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 替代
查询选中图元的所有参数
getSelectedPrimitives(): Promise<Array<Object>>;Promise<Array<Object>>
选中图元的所有参数