As demonstrated previously, there is an inconsistency between the Revit manifest ClientId node and the AddInId word as mentioned in some UIs. In fact, both the ClientId and the AddInId are supported by the Revit manifest format.
Manifest files work well if the ClientId is used. For example:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>C:\Temp\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<ClientId>809fa6b4-8e99-484e-84ba-cdfbac07ce99</ClientId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
It also works if the ClientId is replaced by the AddInId in the above file:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>C:\Temp\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<AddInId>809fa6b4-8e99-484e-84ba-cdfbac07ce99</AddInId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
What will happen then if both the ClientId and the AddInId nodes are specified for the same addin type in a single manifest file as follows?
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>C:\Temp\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<ClientId>809fa6b4-8e99-484e-84ba-cdfbac07ce99</ClientId>
<AddInId>809fa6b4-8e99-484e-84ba-cdfbac07ce99</AddInId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
Don’t worry. Things are still fine.
What about the ClientId value in the above manifest being replaced by something that has already been used by some other addin as follows?
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>Temp\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<AddInId>809fa6b4-8e99-484e-84ba-cdfbac07ce99</AddInId>
<ClientId>eb50174d-414b-4453-9d2d-63e2960f28a3</ClientId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
Here, the ClientId eb50174d-414b-4453-9d2d-63e2960f28a3 is used by another assembly, RevitAddinCS2. This time, both assemblies will fail to be loaded. So it proves that both AddInId and ClientId are valid in Revit manifest format even if they appear at the same time, and their order does not matter.
If the ClientId in the above manifest is changed to eb50174d-414b-4453-9d2d-63e2960f28a0 for example, which is not used by any other addin files, the assembly will be loaded into Revit without problems. Not sure which ID will be exactly used though. If necessary, it can be easily figured out by calling the UIApplication.ActiveAddInId property. If interested in, please feel free to give it a try.
As discussed and demonstrated before, RevitAddinWizard uses the ClientId always for consistency. In the future, it may switch to the AddInId when necessary. Anyway, please do not worry too much about it at this moment since they all work fine; not in the future either as RevitAddinWizard takes care of it for us.
Related posts:
Deploy & Install: Revit Application Addin Manifest
Deploy & Install: Revit Command Addin Manifest
Deploy & Install: Revit Addin Roaming Folders
Deploy & Install: The Registry of Revit 2011
Deploy & Install: The Registry of Revit 2012
Deploy & Install: Where Are Revit Products Installed
Deploy & Install: Manifest Navigator of RevitAddinWidget
Deploy & Install: RegEdit Launcher of RevitAddinWidget
Deploy & Install: Revit Locator of RevitAddinWidget
Deploy & Install: Manifest Encoding
Deploy & Install: Manifest Loading
Deploy & Install: Manifest ClientId
Deploy & Install: Manifest ClientId and AddinId
Deploy & Install: Manifest Integrity
Deploy & Install: Revit Manifest Organizer
Deploy & Install: Create New Of Revit Manifest Organizer
Deploy & Install: Check Integrity New Of Revit Manifest Organizer
Deploy & Install: Detect Duplicate New Of Revit Manifest Organizer
Deploy & Install: View Selected Of Revit Manifest Organizer
Deploy & Install: Edit Selected Of Revit Manifest Organizer
Deploy & Install: Merge Selected Of Revit Manifest Organizer
Deploy & Install: Dismantle Selected Of Revit Manifest Organizer
Deploy & Install: Copy/Move/Delete Selected Of Revit Manifest Organizer
Deploy & Install: Miscellaneous Of Revit Manifest Organizer
Deploy & Install: Create Revit Manifest Files Programmatically With C#
Deploy & Install: Programmatically Detect Windows Versions And Find Revit Addin Roaming Folders
Deploy & Install: Revit Addin Project Output And API Dependencies
Deploy & Install: Revit Addin Projects and Visual Studio Setup Custom Actions
Deploy & Install: Deploy Revit Manifest Files with C# Using Installer Custom Actions
Recent Comments