Welcome to Add-In Manager 2011

This section includes licensing information and any other information pertinent to this release of Add-In Manager for Autodesk Revit.

  • Copyright Information
  • What's New


Copyright Information

© 2010 Autodesk, Inc. All rights reserved.

All use of this Software is subject to the terms and conditions of the Autodesk End User License Agreement accepted upon installation of this Software and/or packaged with the Software.

Trademarks

Autodesk and Revit are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates, in the USA and/or other countries.

All other brand names, product names or trademarks belong to their respective holders.

Third-Party Software Credits and Attributions

SplitButton Copyright (c) 2010, wyDay. All rights reserved.


What's New

Support new addin registration mechanism
Add-In Manager 2011 adds support to the new ExternalCommand and ExternalApplication registration mechanism by .addin manifest file. Users can make a .addin file and place it to correct place automatically by Add-In Manager.(More details of the manifest file can be found from "What's New" page of RevitAPI.chm)
The revit.ini registration mechanism has been removed from Add-In Manager 2011, meaning that user can no longer write registration data to Revit.ini by Add-In Manager

Change the way of developing and debugging addins
Usually, when developing and debugging an addin with RevitAPI, user has to close & re-open Revit each time he/she modifies the addin code and wants to re-compile. But with Add-In Manager 2011, user can modify and run the addin directly without closing & re-opening Revit again and again (find more details from Develop & Debug addins with Add-In Manager).

Faceless mode of Add-In Manager
Add-In Manager normally has a main dialog when user launches it. User can load/execute/remove/save addins via it. It's useful for user to manage or switch among multiple addins. But it's totally useless if user is developing and debugging a single addin all the time. With the faceless Add-In Manager, the MRU(most recently used) addin will be executed automatically without any additional UI operations (find more details from the Faceless mode of Add-In Manager).


Using Add-In Manager

Add-In Manager is an external tool that can add External Command or Application to Revit by loading API enabled .dll file. You can add or remove an External Command or Application. For External Command, Add-In Manager allows you to load and run it directly.

Topics in this section include:

  • Add an External Command
  • Add an External Application
  • Run an External Command
  • Remove an External Command or Application
  • Save External Command and Application data to manifest file


Add an External Command

Add-In Manager can load an External Command to Revit by loading a .dll file that contains the External Command.

  1. Click Add-Ins tab > External Tools > Add-In Manager 2011.
  2. In the main dialog, click Load.
  3. In the Open dialog box, select the .dll file you want to load and click Open.
  4. The loaded .dll file with the External Command is listed on the Loaded Commands tab and selected by default. Click the .dll file, its path will be listed in the Notes field.
    NOTE: An error message will be displayed in the Notes field when it fails to load the .dll file. Loading a .dll file will load any External Applications and External Commands it contains to Revit.
  5. On the Loaded Commands tab, click the External Command.
  6. The default command name is displayed in the Name field. You can edit it or enter a new name.
  7. The default command description is displayed in the Description field. You can edit it or enter a new one.


Run an External Command

You can run an External Command through the main dialog after loading it.

  1. On the Loaded Commands tab, select a loaded External Command you want to run.
  2. Click "Run" button.
    3. NOTE: If it fails to run the command, the error information will be listed in the Notes field.
  3. You can also double click on a External Command node from the tree view to run the command.


Add an External Application

Add-In Manager for Autodesk Revit can add an External Application to Revit by loading a .dll file that contains the External Application.

  1. Click Add-Ins tab > External Tools > Add-In Manager 2011.
  2. In the main dialog, click Load.
  3. In the Open dialog box, select the .dll file you want to load and click Open.
  4. The loaded .dll file with the External Application is displayed on the Loaded Applications tab and selected by default. Click the .dll file, its path will be displayed in the Notes field.
    NOTE: An error message will be displayed in the Notes field when it fails to load the .dll file. Loading a .dll file will load any External Applications and External Commands it contains to Revit.

After Revit is restarted, the loaded External Application will run at the startup and close of Revit.


Remove an External Command or Application

If an External Command or Application is no longer needed, you can remove it through Add-In Manager. You can remove only one External Application or Command each time. The corresponding .dll file is not deleted from the disk.

  1. Click Add-Ins tab > External Tools > Add-In Manager 2011.
  2. In the main dialog, on the Loaded Commands or Loaded Applications tab, click the .dll file that contains the External Command or Application you want to remove.
  3. Click Remove. The item you selected is removed from the list.


Save External Command or Application to manifest file

Revit 2011 supports the new .addin manifest registration mechanism. It's inconvenient to write a manifest file manually. With Add-In manager, you can do it easily

  1. Click Add-Ins tab > External Tools > Add-In Manager 2011.
  2. In the main dialog, on the Loaded Commands or Loaded Applications tab, all the commands/applications are checked by default.
  3. Uncheck any command/application that you don't want to save. (Optional)
  4. Click Save.
  5. The path of the saved .addin manifest file is shown in the "Note" text box

Note: If you still plan to modify and debug the addin, don't use this feature. Let the addin be managed by Add-In Manager until you finish the development and won't modify/debug the code any more.
Reason: Every time Revit launches, it will read those Manifest files and load the addin DLLs into its AppDomain when execution. After that, the addin DLL is locked by the Revit process and you can't edit & compile the code as long as the Revit process exists


Advanced

This release of Add-In Manager contains some major feature changes. All the changes are aimed to help API users to develop addins: simplify the operations, save the time.

Topics in this section include:

  • How to set hotkeys to Add-In Manager
  • Faceless mode of Add-In Manager
  • How to develop & debug addin code with Add-In Manager


Use Add-In Manager with hotkeys

Use Add-In Manager with hotkeysUse Add-In Manager with hotkeys

Revit allows setting hotkeys to external tools. While Add-In Manager is also an external tool, user can set hotkeys to it to accelerate the operations.

  1. Click Application Menu->Options.
  2. In the "User Interface" tab, click "Customize" button for "Keyboard shortcuts".
  3. In the "Keyboard Shortcuts" dialog, select "Add-Ins Tab" from the "Filter" drop-down list.
  4. Set hotkeys to External Tools: Add-In Manager 2011(Manual Mode), say, "AA".
  5. Set hotkeys to External Tools: Add-In Manager 2011(Manual Mode, Faceless), say, "SS".
  6. Close this dialog. Press "A" twice, the Add-In Manager dialog shows up!


Faceless mode of Add-In Manager

Add-In Manager shows up to user with a dialog box, user must specify a command from the list for execution each time. When user is developing and debugging an single add-in for many times, he/she still has to specify the command before executing it, it's totally meaningless and unnecessary.
With Add-In Manager Faceless mode, you can get rid of all the mouse operations and call the command quite easily!

How to Debug addin with Faceless Add-In Manager? (Before go to next section, make sure you set hotkeys to Add-In Manager. In the following steps, I assume setting hotkey "AA" to Add-In Manager UI-mode and "SS" to Faceless-mode)

  1. Write code and compile it;
  2. Launch Revit;
  3. Press key "A" twice (it's the hotkeys you set for Add-In Manager, you can set as you like) to Launch Add-In Manager UI-mode (with UI dialog showing up)
  4. Pick a command and run it;
  5. Find some bugs, return to code, edit and compile the code;
  6. Press key "S" twice to run the command just executed. You needn't wait for UI dialog and specify the command by mouse operations.

Note: The faceless Add-In Manager runs the MRU(most recently used) command. If user launches Revit, then run Add-In Manager faceless directly, Add-In Manager will turn to the UI mode automatically since there's no MRU command.


Develop and Debug addins with Add-In Manager

Develop & Debug addins with Add-In Manager

Here is a comparison of developing addin with/without Add-In Manager. The operations which requires much time are marked as red
without Add-In Manager | with Add-In Manager
Write code | Write code
Compile | Compile
go to the manifest folder generate an .addin file manually:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
<AddIn Type="Command">
<Assembly>%dllpath%\dllname.dll</Assembly>
<ClientId>a new guid, need to be generated with some tool/visual studio</ClientId>
<FullClassName>namespace.classname</FullClassName>
<Text>%displayname%</Text>
<Description>%description%</Description>
</AddIn>
</RevitAddIns> 		n/a
Launch Revit | Launch Revit
Click "Add-ins" ->"External tools" ->launch your add-in
1. Launch Add-In Manager with simple keystrokes defined for Add-In Manager(UI mode);
2. Load the addin dll into AIM;
3. Double-click the command item to run it
Find the add-in has some bugs, you will:
  • Close Revit
  • Modify your code and compile
Modify your code and compile
  • Open Revit
  • Click "Add-ins" ->"External tools" ->launch your add-in
Launch your add-in with simple keystrokes defined for AIM(faceless mode)
Add/rename/remove some EC/EA classes, you will
  • Close Revit
  • Modify your code to add/rename/remove EC/EA classes and compile
Modify your code to add/rename/remove EC/EA classes and compile
  • Modify your revit.ini or .addin file
  • Open Revit
  • Click "Add-ins" ->"External tools" ->launch your add-in
1. Launch AIM with simple keystrokes(UI mode)
2. Remove the add-in dll and re-load it to update the EC/EA class list
3. double click the EC command item to execute


Glossary

  • Glossary Terms


Glossary Terms

ExternalCommand

Autodesk Revit API enables you to add new commands to Autodesk Revit. These commands will be added to the External Tools in the Add-Ins tab. Through the API, External Commands have access to the Revit database, as well as the currently selected elements.

ExternalApplication

Autodesk Revit API enables you to add External Applications which provide the same access as the ExternalCommand and also provide the ability to create new ribbon panels, pushdown buttons, pulldown buttons and react to application events.

RevitAPI

For more information about RevitAPI and Add-Ins, please reference to RevitAPI.chm.


Known Issues

Add/Remove/Rename the ExternalCommand/ExternalApplications classes, Add-In Manager doesn't update it automatically
Work-around: After making changes to add/remove/rename ExternalCommand/ExternalApplications class, launch Add-In manager, remove the addin first and load it back, the commands can be updated successfully.

TransactionMode/RegenerationOption compatibility issue
Symptom: If the TransactionMode & RegenerationOption set to addin is not the same as the mode of Add-In Manager, the addin may not run correctly.
Issue: Add-In Manager itself is an ExternalCommand class, if it's Manual mode, no matter what values set to the addin, Revit will treat the addin as manual mode.
Suggestion: We recommend you use Manual mode for TransactionMode & RegenerationOption. The Automatic mode of TransactionMode & RegenerationOption may be removed in future release.
Work-around: always select the correct type of Add-In Manager. Add-In manager supplies 2 types of modes: Automatic and Manual. TransactionMode.Readonly is not supported.
If the TransactionMode and RegenerationOption are set to Automatic, use Add-In Manager (Automatic mode) and Add-In Manager (Automatic mode, faceless) to run it;
If the TransactionMode and RegenerationOption are set to Manual, use Add-In Manager (Manual mode) and Add-In Manager (Manual mode, faceless) to run it;