|
![]() |
![]() |
---|
Navisworks Freedom does not provide support for plug-ins. |
Plug-ins are the main entry point for extending the Navisworks application. Plug-ins are .NET assemblies with classes derived from one of the plug-in classes provided by the API. The assemblies are loaded, when the application starts, from a folder contained within the 'Plugins' folder in the installation folder.
![]() |
---|
Application..::..MainDocument will always have a value throughout the runtime of the Navisworks main application. |
How plug-ins are loaded by Navisworks
When Navisworks loads it examines the 'Plugins' subfolder under the installation directory of the product being loaded. For each directory contained therein, Navisworks uses the folder name to identify the assembly to load within that folder. For example Abc.Def\Abc.Def.dll.
![]() |
---|
The format of the subdirectory name must be exactly the same as the name of the main assembly, minus the '.dll' file extension. For example, a plug-in built to an assembly named ABC.XYZ.dll must be installed in '{Navisworks Installation Location}\Plugins\ABC.XYZ\'. If this location is incorrect then the plug-in will not be loaded. |
Navisworks will not fully load a plug-in until it is required but will identify the plug-ins within the assembly using .NET reflection.
![]() |
---|
There is a 'dependencies' folder in the '<drive>:\Program Files\Autodesk\Navisworks <Product> 2015' folder which is intended to be used for plug-ins dependent assemblies. |
Plugin class
The 'Plugin' abstract base class is found under the 'Autodesk.Navisworks.Api.Plugins' namespace in the 'Autodesk.Navisworks.Api' assembly and all Plug-ins should be derived from one of the existing subclasses.
.NET Attributes are used to describe the nature of plug-ins; for example, when the plug-in should be loaded.
The current list of classes in the API, derived from the 'Plugin' abstract base class, is listed below.
Class | Key Information |
---|---|
AddInPlugin | A plug-in which can be optionally shown in the standard location in the Navisworks application ('Add-Ins' tab). |
DockPanePlugin | Allows Developers to add their own custom dockable panes into the Navisworks GUI. |
CommandHandlerPlugin | A plug-in which allows developers to add commands to the GUI. |
EventWatcherPlugin | A plug-in which allows developers to perform actions such as subscribe to events before the GUI has fully instantiated. These Plugins are loaded immediately unlike the other plugin's which are on-demand loaded. |
CustomPlugin | A custom plugin is the most basic plugin that can be defined. It can be used when none of the specialized behaviour of other plugin types is required. |
![]() |
---|
Developers implement classes derived from the required Plugin class and add the required attributes to the class definition. Examples are given both in the provided samples and in this guide. |
PluginAttribute class
The common attribute used for ALL 'Plugin' derived classes is named 'PluginAttribute'. Its constructor and properties are detailed in the Reference Guide.
![]() |
---|
This Attribute must be present on ALL Plug-ins. |
This attribute is important as it dictates to Navisworks the detail that makes this plug-in unique. For example if we examine the attribute below:

[Plugin("AppInfo.AppInfoDockPane", //Plugin name "ADSK", //4 character Developer ID or GUID ToolTip = "Application Information", //The tooltip for the item in the ribbon DisplayName = "AppInfo")] //Display name for the Plugin in the Ribbon
The attribute has two mandatory fields which are set in the constructor.
The first parameter <name> gives a unique name for the plug-in, in the samples we have used the full qualified name (<namespace>.<class name>) as this parameter. The second parameter can be either the developer's unique 4 character RDS or a GUID. These two are used together to uniquely identify the plug-in as <unique name>.<RDS/GUID> . For example 'BasicPlugIn.ABasicPlugin.ADSK', this combination can be used using the Automation parts of the API to invoke the plug-in.
![]() |
---|
The combination of name and RDS/GUID MUST be unique between different plug-ins. If two plug-ins have the same combination, only one of them may be loaded by Navisworks at runtime making results unpredictable. |
AddInPlugin class
AddInPlugin is the most commonly used plug-in and it is recommended by the API developers that this should be the first type of plug-in to try implementing.
See 'Writing Plug-ins for Navisworks' for a step by step example to creating AddInPlugin derived classes.
The attributes used on this tag are:
Attribute parameters | Class | Key Information |
---|---|---|
Location | AddInLocation | Where in the Navisworks GUI this plug-in should appear |
An example of using this attribute would be:

[AddInPluginAttribute(AddInLocation.AddIn)]
DockPanePlugin class
Developers often wish to integrate custom information into the Navisworks GUI.
DockPanePlugin enables developers to create customised dockable panes into the Navisworks GUI. The attributes used on this tag are:
Attribute parameters | Class | Key Information |
---|---|---|
DockPanePluginAttribute..::..AutoScroll | Boolean | Determines if scroll bars should appear when the pane gets bellow it's minimum size |
DockPanePluginAttribute..::..FixedSize | Boolean | Determines if the pane should be resizable |
DockPanePluginAttribute..::..MinimumWidth | Integer | Minimum width of pane, 0 means no preference |
DockPanePluginAttribute..::..MinimumHeight | Integer | Minimum height of pane, 0 means no preference |
DockPanePluginAttribute..::..PreferredWidth | Integer | Preferred width of pane, 0 means no preference |
DockPanePluginAttribute..::..PreferredHeight | Integer | Preferred height of pane, 0 means no preference |
An simple example of using this attribute would be:

[DockPanePlugin(755, 575, //the preferred sizes FixedSize = false, //(Optional) Can the DockPane can grow and shrink AutoScroll = true, //(Optional) Controls the showing and hiding of the scrollbars MinimumWidth = 585, //(Optional) The minimum Width of the Dock Pane MinimumHeight = 280 //(Optional) The minimum Height of the Dock Pane )]
EventWatcherPlugin class
Many advanced GUI addins need to subscribe to events in the Navisworks API. The existing plugins are designed specifically so that they are loaded as late as possible. An EventWatcherPlugin is the one type of plugin that is always loaded and activated as soon as possible and which will remain active for the duration of the session.
The EventWatcherPlugin offers no extra methods or functionality beyond those already present on the Plugin base type.
A typical implementation will subscribe to some API events in EventWatcherPlugin..::..OnLoaded and unsubscribe in EventWatcherPlugin..::..OnUnloading.
CustomPlugin class
CustomPlugin can be used as a base class for a plugin to Navisworks when none of the other specialized plugin behaviour is required.
For example, if a user wishes to write a set of plugins which can be called by a third party program, and wants the benefits of the plugins architecture within Navisworks, they may choose to use this class as a base class.
Combining this class and InterfaceAttribute is an effective way of providing an easily identifiable customised plugin.