Home > SCH_PrimitiveComponent > placeComponentWithMouse
SCH_PrimitiveComponent.placeComponentWithMouse() 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 device
Signature
public placeComponentWithMouse(component: { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem, subPartName?: string): Promise<boolean>;Parameters
Parameter | Type | Description |
|---|---|---|
component | { libraryUuid: string; uuid: string } | ILIB_DeviceItem | ILIB_DeviceSearchItem | Associate library device |
subPartName | string | (Optional) Sub-part name |
Returns
Promise<boolean>
Whether the device was found
Remarks
This API simulates clicking the placement button on the front end. The specified device 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 device is bound to the mouse, this API will immediately return true