Home > SCH_PrimitiveComponent > create
SCH_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, x: number, y: number, subPartName?: string, rotation?: number, mirror?: boolean, addIntoBom?: boolean, addIntoPcb?: boolean): Promise<ISCH_PrimitiveComponent | undefined>;
1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
---|---|---|
component | { libraryUuid: string; uuid: string; } | ILIB_DeviceItem | 关联库器件 |
x | number | 坐标 X |
y | number | 坐标 Y |
subPartName | string | (Optional) 子图块名称 |
rotation | number | (Optional) 旋转角度 |
mirror | boolean | (Optional) 是否镜像 |
addIntoBom | boolean | (Optional) 是否加入 BOM |
addIntoPcb | boolean | (Optional) 是否转到 PCB |
Returns
Promise<ISCH_PrimitiveComponent | undefined>
器件图元对象