Navisworks .NET Addin Wizard (NavisworksNetAddinWizard) build #0.9.8 has been rolled out for some days. It has five more Navisworks Addin Widget items added, LIB Locator, LIB Organizer, LIB Upgrader, Project Inspector, and Debug EXE Setter; two more Navisworks Addin Coder items, Data Collector, and Namespace Replacer.
We demonstrated each of the new widgets and coders one by one earlier.
It also provides nine more item wizards, AddInPlugin Creator, CommandHandlerPlugin Creator, CustomPlugin Creator, DockPanePlugin Creator, EventWatcherPlugin Creator, FileProtocolPlugin Creator, InputPlugin Creator, RenderPlugin Creator, and ToolPlugin Creator.
In this post, let’s demonstrate how to use the EventWatcherPlugin Creator to help us create a Navisworks .NET AddinPlugin nicely shortly.
The Navisworks .NET EventWatcherPlugin Item Wizard can be found from the Navisworks Addin node in the Add New Item dialog as usual.
After an item name is provided, the Plug Attributes dialog will nicely show up regardless of how many attributes may be and how complex they are.
The auto-generated EventWatcherPlugin source file may look like this.
using System;
using System.Text;
using System.Linq;
using System.Xml;
using System.Reflection;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media.Imaging;
using System.Windows.Forms;
using System.Drawing;
using System.IO;
using Microsoft.Win32;
using System.Runtime.InteropServices;
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;
using Autodesk.Navisworks.Api.DocumentParts;
using Autodesk.Navisworks.Api.ApplicationParts;
namespace NavisworksNetAddinCS1
{
[PluginAttribute("NavisworksNetAddinCS1.EventWatcherPlugin1", "NNAW",
DisplayName = "",
ExtendedToolTip = "",
Options = PluginOptions.None,
SupportsIsSelfEnabled = false,
ToolTip = "")]
public class EventWatcherPlugin1 : Autodesk.Navisworks.Api.Plugins.EventWatcherPlugin
{
public override void OnLoaded()
{
}
public override void OnUnloading()
{
}
}
Enjoy it, guys!
The leading edge Navisworks .NET Addin Wizard (NavisworksNetAddinWizard) can be found and downloaded from the A Wizard for Navisworks .NET Addin page.