> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supernote.com/llms.txt
> Use this file to discover all available pages before exploring further.

# getLassoRect

> Get the lasso rectangle.

<Note>
  You must create a lasso selection before calling this API; otherwise the call fails.
</Note>

```ts theme={null}
static getLassoRect(): Promise<APIResponse<Rect>>;
```

**Returns**

* [`APIResponse<Rect>`](/en/api-reference/supernote-plugin/types/api-response):
  `result` is [`Rect`](/en/api-reference/supernote-plugin/types/rect) in pixel coordinates.

## Example

```ts wrap theme={null}
import { PluginCommAPI, type Rect } from 'sn-plugin-lib';

/**
 * Example: get lasso rectangle.
 */
export async function exampleGetLassoRect(): Promise<Rect> {
 const res = await PluginCommAPI.getLassoRect();
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getLassoRect call failed');
 }
 return res.result;
}
```
