I have a Python add-in with a good amount of buttons and menus. I'm trying to remove a menu using the addin_assistant, but the menu isn't being removed from config.xml. I've tried removing the add-in in ArcMap and re-adding it, but that didn't help.
The process I'm doing:
- Open the Python Add-in Wizard, browse to my add-in folder.
- Find the menu. Right click and Remove.
- Save. Click OK for the backup warning message.
The config.xmldocument date is modified automatically by saving.
- Open the XML and see that the menu is not removed.
Quick thoughts: I've tried restarting my computer. I've removed buttons successfully. I can't remake the add-in every time I want to remove a menu. Customize Mode -> Delete for the menu (in ArcMap) isn't feasible because this add-in will be shared with hundreds of users.
Any thoughts? Please let me know if you need more info.
I've copied the contents of my add in folder to a different folder. I tried removing the menu the way I previously described and it didn't work.
I edited the XML in Notepad++ to manually remove the menu and ran the makeaddin.py file, then removed and re-added the add-in in ArcMap. This didn't remove the menu.
Double clicking and installing the esri addin file worked to remove the menu since I've edited the XML, but now when I try to access the add-in directory using the add-in assistant I get an error window that says:
Error initializing Add-In
add-in name.menu_remove (which was the name of the menu ID).
It seems that the addin_assistant is expecting to find menu, but since it was removed in XML it's throwing an error.
I didn't fully delete all of the required lines in XML. The error thrown above no longer appears. I had to delete both the Menu caption for the menu category and the Menu refID that referenced my menus ID (menu_remove).
Editing the XML works well enough to consider this answered. Esri believes the issue is a bug or limitation with the python addin wizard. I'll add that info when I receive it.