Hello all,
I have a python addin which I have made a copy of then made a few changes to the copy. I would like to have both addins loaded in arcmap but for some reason only one addin will display.
I'm wondering if it could be because both addins have the same AddInId value:
You can see in this picture from ArcMap that one toolbar is installed but both are showing in the Add-In Manger.
Any thoughts appreciated.
Thanks!
After making a copy and making a few changes did you run the makeaddin.py script? If you did, could you provide a few more details about the copy/update/install process you used?
From Essential Python add-in concepts:
The makeaddin.py Python file is a utility script created by Python Add-In Wizard and is used to package the files and folders within the project folder into the compressed add-in file. Double-click this file to create the add-in file. Each time you make changes to the add-in, you must run this script to repackage the add-in file with the latest updates.
Hi Randy,
Yes I did run makeaddin.py and then I copied the .esriaddin file into a well known folder. I have 2 .esriaddin's that I want to install 1) agendamapping.esriaddin and 2) agendamappingsql-dev.esriaddin
Here are a few examples of what I'm seeing:
Interesting though, when both .esriaddin files are in the well known folder if I select Customize > Add-In Manager, I see both addins listed:
Thanks for any help!
I have doing some experiments with add-ins, and I think you are partially correct that the problem is with the AddInID. Testing an add-in mentions one use of the AddInID:
The installation utility copies the add-in file to a generated subfolder under the default add-in folder; the subfolder is automatically generated using a globally unique identifier (GUID). This prevents file naming conflicts that might occur if several add-ins have the same file name. Although add-ins can be manually copied to a default add-in folder, doing so bypasses the security and name conflict checks the add-in installation utility performs.
Additionally in the add-in's XML, there are some other items that affect the add-in's operation. With the Add-In Wizard I created the start of an add-in.
The XML generated by the wizard looks like this (note the red dots above and where it appears in the XML):
<ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Version2</Name>
<AddInID>{6f8bf92b-918d-440f-9fb8-e2cb53bc5f44}</AddInID>
<Description>Some description text</Description>
<Version>0.1</Version>
<Image />
<Author>Author's name</Author>
<Company>Author's company</Company>
<Date>12/13/2018</Date>
<Targets>
<Target name="Desktop" version="10.1" />
</Targets>
<AddIn language="PYTHON" library="Version2_addin.py" namespace="Version2_addin">
<ArcMap>
<Commands>
<Tool caption="Version 2" category="Version2" class="Class2" id="Version2_addin.tool" image="" message="Some message text" tip="Text of tip">
<Help heading="Some heading text">Some help text</Help>
</Tool>
</Commands>
<Extensions></Extensions>
<Toolbars>
<Toolbar caption="Toolbar2" category="Version2" id="Version2_addin.toolbar" showInitially="true">
<Items>
<Tool refID="Version2_addin.tool" />
</Items>
</Toolbar>
</Toolbars>
<Menus></Menus>
</ArcMap>
</AddIn>
</ESRI.Configuration>
I think some of the problem might also relate to the duplication of the names (the red dots).
My recommendation when you want to copy and modify an add-in is to:
It's probably not the simple rename process you were looking for, but it is fairly easy. Hope this helps.
Thanks for the detailed info Randy. I’ll give this a shot. Makes sense to create a new empty shell then move everything into it. I’ll update the thread again with my final results. Cheers!