Revit API 2012 provides some more functionalities and changes some existing ones. Some of the changes are very necessary and some may not be so. From now on, let us look at these changes and new functionalities in the Revit API 2012.
In this post, we will focus on the manifest format.
If an old version manifest file like the following is trying to be parsed by Revit 2012:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>C:\Temp\Revit2012\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<ClientId>acf561d2-8c6c-4beb-be55-2346825b53a4</ClientId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
a ‘No VendorId Node for Addin-in’ error will come up like:
As stated clearly, “Failed to initialize the add-in because the add-in registration is missing the required value of VendorId node. The VendorId node identify the vendor of the add-in application. For Revit to run the add-in, you must register the node defined in manifest file.”, one extra manifest node, the VendorId, is needed in the Revit manifest 2012.
After the VendorId node being added into the manifest like so,
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Application">
<Assembly>C:\Temp\Revit2012\RevitAddinCS1\bin\Debug\RevitAddinCS1.dll</Assembly>
<FullClassName>RevitAddinCS1.ExtApp</FullClassName>
<ClientId>acf561d2-8c6c-4beb-be55-2346825b53a4</ClientId>
<VendorId>RevitAddinWizard</VendorId>
<Name>RevitAddinCS1</Name>
</AddIn>
</RevitAddIns>
the manifest can pass the verification and the assembly be loaded up into Revit 2012 successfully supposing being properly migrated, re-linked and rebuilt.
It is obvious that the VendorId is supposed to tell Revit who produces the Revit addin but not that why it should be a must.
Will it bring up any fatal problems if the VendorId being skipped from the developers’ perspective (or being optional from the API’s perspective)?
Not likely so.
But one thing is clear: players have to follow the game rules. Not a big deal! A few approaches exist. One is to add the VendorId one by one manually to the Revit manifest files of all those old but needing-migrated Revit addins. Another is to create a small command-line program to add the required VendorId nodes programmatically.
The best approach is apparently to not worry about it at all through selecting version 2012 in Revit Addin Wizard (RevitAddinWizard) at the moment of addin project creations or using the cool and friendly GUI of Revit Manifest Organizer to automatically inspect Revit manifest files and upgrade them from version 2011 to 2012 automatically when necessary.
Recent Comments