Adding a command to the Map Window Context Menu
A menu Item can either be directly added to the SIS Map Window context menu or to a pre-existing Menu Item object as a nested sub-menu.
# Create the parent menu item self.parent_menu = gislink.MenuItem("My Context Menu Parent") # Add menu item to the context menu self.application.context_menu.items.append(self.parent_menu) # Create the nested menu item self.nested_menu = gislink.MenuItem("My Nested Menu") # Add nested menu item to parent menu item, rather than root context menu self.parent_menu.items.append(self.nested_menu)