LinkingTool - insertLink -how to choose a category link template

Hello
I have trouble, I do not know how to change the link template ( from diagram.linkTemplateMap) to something other than the default when I insert a link via linkingTool.insertLink

Best Regards Tadeusz :)

Just change the category of the LinkingTool.archetypeLinkData object to be whatever template category name that you want it to use.

The Grafcet Diagrams sample demonstrates one way to set the category on the myDiagram.toolManager.linkingTool.archetypeLinkData.

The custom LinkingTool in Page Not Found -- Northwoods Software demonstrates how one can determine the new link category dynamically. It also replaces the whole LinkingTool.archetypeLinkData object instead of just changing its category property value.