We talked about the Revit Addin Manifest file quite a while back. We are going to talk about the command type addin manifest format in a bit more detail in this post.
The root node is RevitAddIns for both external applications and external commands as introduced before. The Type attribute of the AddIn node is Command for external commands. The Addin node provides many sub nodes, Assembly, FullClassName, ClientId, Text, Description, VisibilityMode, AvailabilityClassName, LargeImage, LongDescription, TooltipImage, and LanguageType.
The Assembly, FullClassName and ClientId notes are mandatory, just as in the external application addin manifest. It is easy to understand since they are all necessary to identify external applications. The Assembly specifies the full name of the executable; the FullClassName the full name of the external command class, which is derived from the IExternalCommand interface; the ClientId (not AddInId, please note) a GUID to identify the external command universally.
All the others are optional. They either provide a more meaningful button appearance (like images, tooltips, and descriptions) for the command or determine command applicability (like when and where a command is visible and in what situations the command ought to be enabled).
Here is a sample of the external command manifest:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>C:\Temp\RevitAddinCS\bin\Debug\RevitAddinCS.dll</Assembly>
<FullClassName>RevitAddinCS.ExtCmd</FullClassName>
<ClientId>5065126b-c524-4837-9ded-d283fb99563b</ClientId>
<Text>Command ExtCmd</Text>
<Description>The command ExtCmd</Description>
<VisibilityMode>NotVisibleInFamily</VisibilityMode>
<VisibilityMode>NotVisibleWhenNoActiveDocument</VisibilityMode>
<VisibilityMode>NotVisibleInStructure</VisibilityMode>
<VisibilityMode>NotVisibleInMEP</VisibilityMode>
<VisibilityMode>NotVisibleInMechanical</VisibilityMode>
<VisibilityMode>NotVisibleInElectrical</VisibilityMode>
<VisibilityMode>NotVisibleInPlumbing</VisibilityMode>
</AddIn>
</RevitAddIns>
The ClientId (not AddInId) is critical. If another external command is given the same GUID, an error message will show up when the command is trying to be loaded into Revit.
RevitAddinWizard provides a Command Manifest Creator which can create a manifest file automatically for any existing external commands in a visual studio project.
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