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 RenderPlugin Creator to help us create a Navisworks .NET AddinPlugin nicely shortly.
The Navisworks .NET RenderPlugin 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 RenderPlugin 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.RenderPlugin1", "NNAW",
DisplayName = "",
ExtendedToolTip = "",
Options = PluginOptions.None,
SupportsIsSelfEnabled = false,
ToolTip = "")]
public class RenderPlugin1 : Autodesk.Navisworks.Api.Plugins.RenderPlugin
{
public override BoundingBox3D MakeRenderBoundingBox(Autodesk.Navisworks.Api.View viewer)
{
return default(BoundingBox3D);
}
public override void OverlayRenderModel(Autodesk.Navisworks.Api.View view, Autodesk.Navisworks.Api.Graphics graphics)
{
}
public override void OverlayRenderWindow(Autodesk.Navisworks.Api.View view, Autodesk.Navisworks.Api.Graphics graphics)
{
}
public override void RenderModel(Autodesk.Navisworks.Api.View view, Autodesk.Navisworks.Api.Graphics graphics)
{
}
public override void RenderWindow(Autodesk.Navisworks.Api.View view, Autodesk.Navisworks.Api.Graphics graphics)
{
}
}
}
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.