Editing add-ins
It is often necessary to edit an add-in to make improvements or add new functionality.
This topic demonstrates how to edit an add-in.
- Verify that the initial add-in project works.
Assuming you have already created an add-in project, this step is a little redundant; however, it is still valuable in cases where there has been time between the first version and the update you are about to do. In addition, testing and ensuring functionality gives you a base for moving forward with modifications. Here are some considerations for this step in the process:
- Test your add-in on a machine using the same workflows used by the individuals who use the add-in.
- Back up your existing add-in project in case you need to roll back the changes.
- If errors exist in your current version of the add-in, make sure you can reproduce them in your development environment.
- Make improvements or add new functionality.
Now that you have a backup of the add-in project, you can begin making edits:
- Making edits to the project settings or add-in contents.
- If you require updating the settings, such as the description, image, or version, launch the Python Add-In Wizard and browse to your existing project folder (not the backup project).
- If edits are made that do not change the Python script, delete the newly created script from your working folder and rename the backup to its original name.
- If new add-in types are added or changes are made to the class names, copy the code from the backup script into your newly created script, as necessary.
- Making edits to the Python script.
- If you only need to update and add functionality to the existing add-in script, there is no need to open the Python Add-In Wizard. Rather, just edit the Python script to make the necessary changes and save.
- Making edits to the project settings or add-in contents.
- Test your edits.
Once you have finished making edits, it is important to rebuild the add-in file and test the add-in before sharing it. For this information, see Testing an add-in.
- Reshare your add-in.
After testing and confirming the add-in works as expected, you are ready to deploy and share the add-in. For more information, see Sharing add-ins.