Skip to main content

Programmatic access

There are two ways you can access a category programmatically. You can either access it by index (where 0 is the top category):

var category = toolbox.getToolboxItems()[0];

Or by ID:

var category = toolbox.getToolboxItemById('categoryId');

Where the ID is specified in the toolbox definition:

{
"kind": "category",
"name": "...",
"toolboxitemid": "categoryId"
}