גישה פרוגרמטית

יש שתי דרכים לגשת לקטגוריה באופן פרוגרמטי. אפשר לגשת אליה לפי אינדקס (כאשר 0 היא הקטגוריה העליונה):

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

או לפי מזהה:

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

המזהה מצוין בהגדרה של ערכת הכלים:

JSON

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

XML

<category name="..." toolboxitemid="categoryId"></category>