in the PROCESS tab of the Visio ribbon needs to be extended to include our new features:
There are four new buttons required:
- Annotate
- Report
- Export
- Import
These are added to the Ribbon.xml
file and the relevant call-backs are added to the Ribbon
class.
The Annotate button is enabled for all diagrams but the other buttons are only enabled when the Rules Explorer window is open, and I have arranged them on the drop-down menu of a split button.
The OnAction
event of the Annotate button checks whether the active page type is a visTypeForeground
. This is because a user may inadvertently be on a reviewer (visTypeMarkup
) or background (visTypeBackground
) page when the button is pressed. This is explained further in the next section. Initially, the Ribbon
class gets the call-back from the clicked button, and then re-directs it to the ThisAddin
class:
case "buttonAnnotate":
Globals.ThisAddIn.OnActionAnnotateIssues();
...