Home > SCH_PrimitiveComponent > placeSymbolWithMouse
SCH_PrimitiveComponent.placeSymbolWithMouse() 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 symbol
Signature
function placeSymbolWithMouse(
symbol: { libraryUuid: string; uuid: string } | ILIB_SymbolItem | ILIB_SymbolSearchItem,
subPartName?: string,
properties?: Record<string, boolean | number | string | undefined>,
): Promise<boolean>;2
3
4
5
Parameters
Parameter | Type | Description |
|---|---|---|
symbol | { libraryUuid: string; uuid: string } | ILIB_SymbolItem | ILIB_SymbolSearchItem | Associate library symbol |
subPartName | string | (Optional) Sub-part name |
properties | Record<string, boolean | number | string | undefined> | (Optional) Device property |
Returns
Promise<boolean>
Whether the symbol was found
Remarks
This API simulates clicking the placement button on the front end. The specified symbol 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 symbol is bound to the mouse, this API will immediately return true ADD since API v0.2.26