Home > PCB_PrimitiveComponent > create
PCB_PrimitiveComponent.create() 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
create(component: {
libraryUuid: string;
uuid: string;
} | ILIB_DeviceItem, layer: TPCB_LayersOfComponent, x: number, y: number, rotation?: number, primitiveLock?: boolean): Promise<IPCB_PrimitiveComponent | undefined>;
1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
---|---|---|
component | { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | 关联库器件 |
layer | 层 | |
x | number | 坐标 X |
y | number | 坐标 Y |
rotation | number | (Optional) 旋转角度 |
primitiveLock | boolean | (Optional) 是否锁定 |
Returns
Promise<IPCB_PrimitiveComponent | undefined>
器件图元对象