Occurs when the Application's GUI has been created.
Gui will be non-null.
Namespace: Autodesk.Navisworks.Api
Assembly: Autodesk.Navisworks.Api (in Autodesk.Navisworks.Api.dll)
Syntax
Examples
CopyBuilding an EventWatcherPlugin
using System.Windows.Forms;
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;
namespace EventWatcher
{
[Plugin("EventWatcher", "ADSK",
DisplayName = "Event Watcher")]
public class EventWatcher : EventWatcherPlugin
{
public override void OnLoaded()
{
Autodesk.Navisworks.Api.Application.GuiCreated += Application_GuiCreated;
Autodesk.Navisworks.Api.Application.GuiDestroying += Application_GuiDestroying;
}
public override void OnUnloading()
{
Autodesk.Navisworks.Api.Application.GuiCreated -= Application_GuiCreated;
Autodesk.Navisworks.Api.Application.GuiDestroying -= Application_GuiDestroying;
}
void Application_GuiCreated(object sender, System.EventArgs e)
{
MessageBox.Show("The Gui has been created");
}
void Application_GuiDestroying(object sender, System.EventArgs e)
{
MessageBox.Show("The Gui is being destroyed");
}
}
}
See Also