Home > PCB_PrimitiveComponent > modify
PCB_PrimitiveComponent.modify() 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
typescript
modify(primitiveId: string | IPCB_PrimitiveComponent, property: {
layer?: TPCB_LayersOfComponent;
x?: number;
y?: number;
rotation?: number;
primitiveLock?: boolean;
attributes?: {
[key: string]: any;
};
addIntoBom?: boolean;
designator?: string | null;
name?: string | null;
uniqueId?: string | null;
manufacturer?: string | null;
manufacturerId?: string | null;
supplier?: string | null;
supplierId?: string | null;
}): Promise<IPCB_PrimitiveComponent | undefined>;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Parameters
Parameter | Type | Description |
---|---|---|
primitiveId | string | IPCB_PrimitiveComponent | 图元 ID |
property | { layer?: TPCB_LayersOfComponent; x?: number; y?: number; rotation?: number; primitiveLock?: boolean; attributes?: { [key: string]: any; }; addIntoBom?: boolean; designator?: string | null; name?: string | null; uniqueId?: string | null; manufacturer?: string | null; manufacturerId?: string | null; supplier?: string | null; supplierId?: string | null; } |
Returns
Promise<IPCB_PrimitiveComponent | undefined>
器件图元对象