|
![]() |
Optional attribute for use with an AddInPlugin derived class.
If this attribute is not used, the default location for an AddInPlugin is AddInLocation.AddIn
Namespace: Autodesk.Navisworks.Api.Plugins
Assembly: Autodesk.Navisworks.Api (in Autodesk.Navisworks.Api.dll)
Syntax
Visual Basic |
---|
<AttributeUsageAttribute(AttributeTargets.Class)> _ Public NotInheritable Class AddInPluginAttribute _ Inherits Attribute |
C# |
---|
[AttributeUsageAttribute(AttributeTargets.Class)] public sealed class AddInPluginAttribute : Attribute |
Visual C++ |
---|
[AttributeUsageAttribute(AttributeTargets::Class)] public ref class AddInPluginAttribute sealed : public Attribute |
Remarks
AddInPlugin can be used as a base class for adding an executable plugin to Navisworks and optionally the GUI.
This attribute (AddInPluginAttribute) sets various properties for the Addin.
The attribute PluginAttribute must be applied as this provides the unique information relating to any plug-in.
See Plug-ins and Writing Plug-ins for Navisworks for more information on creating plug-ins.

Examples

[PluginAttribute("MessageSenderReceiver.MessageReceiver", //Plugin name "ADSK")] //4 character Developer ID or GUID [AddInPluginAttribute(AddInLocation.None)] //Identifies this as an Addin Plugin, that will not display in the ribbon public class MessageReceiver : AddInPlugin //Derives from AddInPlugin { public override int Execute(params string[] parameters) { //initialise a buffer to store the message String buffer = string.Empty; //Iterate the parameters and build the complete message foreach (String param in parameters) { buffer = buffer + "\r\n" + param; } //create the dialog to display to the user MessageReceived messageReceived = new MessageReceived(); //assign the message to be displayed messageReceived.Message = buffer; //Show the dialog messageReceived.ShowDialog(Autodesk.Navisworks.Api.Application.Gui.MainWindow); //return the the caller the value given by the user return messageReceived.ReturnValue; } }