Home > PCB_PrimitiveComponent > placeFootprintWithMouse
PCB_PrimitiveComponent.placeFootprintWithMouse() 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.
Place with the mouse footprint
Signature
function placeFootprintWithMouse(
footprint:
{ libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem,
properties?: Record<string, boolean | number | string | undefined>,
): Promise<boolean>;2
3
4
5
Parameters
Parameter | Type | Description |
|---|---|---|
footprint | { libraryUuid: string; uuid: string } | ILIB_FootprintItem | ILIB_FootprintSearchItem | Associate library footprint |
properties | Record<string, boolean | number | string | undefined> | (Optional) Device property |
Returns
Promise<boolean>
Whether the footprint was found
Remarks
This API simulates clicking the placement button on the front end. The specified footprint will be bound to the current mouse and placed on the canvas when the user clicks subsequently
The return timing of this API does not wait for the user's placement operation. Once the footprint is bound to the mouse, this API will immediately return true ADD since API v0.2.26