Adding Custom Calls to Addin Functions Shape’s Context Menu
- Last UpdatedMar 27, 2024
- 1 minute read
It is possible to add a custom context menu option and call the Execute() method from any registered Command class or call a PML function.
To achieve this, the shapesheet of the master shape that is representing an item has to be edited in Visio. There, the Action section has to be updated with custom rows Edit master shape in Visio and add own action rows in shape sheet image. This will result in all shapes based on this master having an additional context menu Additional
context menu items image.

Edit master shape in Visio and add own action rows in shape sheet

Additional context menu items
This mechanism is based on the Visio function QUEUEMARKEREVENT. This requires proper parameters that will be parsed when QueueMarkerEvent will be handled by the Diagrams application. According to parameters, the PML function or Command.Execute() will be called.