Shared Types¶
Types used across multiple API methods.
PluginContext¶
Current host application state, passed to menu actions and state queries.
| Field | Type | Required | Description |
|---|---|---|---|
projectPath |
string |
Path of the active schematic or manifold. Omitted (null) when none is open. | |
projectId |
string |
Reserved. Not sent by either host in API v1. | |
selectedComponentId |
string |
Reserved. Not sent by either host in API v1. | |
selectedArticleCode |
string |
Reserved. Not sent by either host in API v1. | |
selectedIBorderId |
string |
Reserved. Not sent by either host in API v1. | |
selectedIBorderName |
string |
Reserved. Not sent by either host in API v1. |
MenuItem¶
A menu item declared by the plugin in GetInfo.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
✅ | Unique identifier for this menu item. |
type |
string |
'action' (default) or 'separator'. | |
label |
string |
Display text. Supports & for accelerator keys. | |
location |
string |
✅ | Where to place the item: plugin, file, or tools (case-insensitive). Items with any other value, including toolbar and context:iborder, are ignored in API v1. |
icon |
string |
Reserved. Ignored by both hosts in API v1. | |
shortcut |
string |
Keyboard shortcut (e.g. Ctrl+Shift+O). | |
requiresOpenProject |
boolean |
Initial enabled state, and the fallback when GetMenuItemState returns no entry for this item. Default false. |
MenuItemState¶
Dynamic state of a menu item.
| Field | Type | Required | Description |
|---|---|---|---|
enabled |
boolean |
✅ | Whether the menu item is clickable. |
checked |
boolean |
Whether the menu item shows a checkmark. Default false. | |
label |
string |
Override the label dynamically. |