Skip to main content
You must create a lasso selection before calling this API; otherwise the call fails.
static getLassoElementTypeCounts(): Promise<APIResponse<object>>;
Returns
FieldTypeDescription
trailNumnumberNormal stroke count
trailLinkNumnumberStroke link count
textLinkNumnumberNormal text link count
todoLinkNumnumberTo-do link count
titleNumnumberTitle count
normalTextBoxNumnumberNormal TextBox count
digestTextBoxNumnumberNon-editable digest TextBox count
digestTextBoxEditableNumnumberEditable digest TextBox count
geometryNumnumberTotal geometry count
straightLineNumnumberStraight line count
circleNumnumberCircle count
ellipseNumnumberEllipse count
polygonNumnumberPolygon count

Example

import { PluginCommAPI } from 'sn-plugin-lib';

/**
 * Example: get lasso element type counts.
 */
export async function exampleGetLassoElementTypeCounts() {
 const res = await PluginCommAPI.getLassoElementTypeCounts();
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getLassoElementTypeCounts call failed');
 }
 return res.result;
}