Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Insert geometry.
static insertGeometry(geometry: Geometry): Promise<APIResponse<boolean>>;
geometry
Geometry
showLassoAfterInsert
APIResponse<boolean>
result === true
import { PluginCommAPI, type Geometry } from 'sn-plugin-lib'; /** * Example: insert a geometry into the current page. */ export async function exampleInsertGeometry() { const geometry: Geometry = { showLassoAfterInsert: false, penColor: 157, // 0x9D dark gray penType: 10, penWidth: 200, // min 100 type: 'GEO_polygon', points: [ { x: 100, y: 100 }, { x: 200, y: 100 }, { x: 200, y: 200 }, { x: 100, y: 200 }, { x: 100, y: 100 }, ], ellipseCenterPoint: null, ellipseMajorAxisRadius: 0, ellipseMinorAxisRadius: 0, ellipseAngle: 0, }; const res = await PluginCommAPI.insertGeometry(geometry); if (!res.success) { throw new Error(res.error?.message ?? 'insertGeometry call failed'); } return res.result; }