DeveloperID for PlugIn

DeveloperID for PlugIn

Anonymous
Not applicable
1,125 Views
5 Replies
Message 1 of 6

DeveloperID for PlugIn

Anonymous
Not applicable

Hi everyone,

I'm developing a PlugIn for Navisworks, but I have to start it from another application.

For the method call I do need a DeveloperID. Can anyone tell me where to find it or how to get it?

 

ExecuteAddInPlugin(pluginid, parameters);

pluginid = name of plugin and developerID

 

Thank you in advance.

0 Likes
Accepted solutions (1)
1,126 Views
5 Replies
Replies (5)
Message 2 of 6

xiaodong_liang
Autodesk Support
Autodesk Support

Hi @Anonymous,

 

searching class AddInPluginRecord in NET help, you will find some codes on how to dump plugins collection. It outputs the developer id, name of the plugin. for convenience, I enclosed the code here. 

 

   StringBuilder plugins = new StringBuilder();

         //iterate the plugins and display a list in a message box
         if (Autodesk.Navisworks.Api.Application.Plugins != null &&
            Autodesk.Navisworks.Api.Application.Plugins.PluginRecords != null)
         {
            foreach (Autodesk.Navisworks.Api.Plugins.PluginRecord pr in
               Autodesk.Navisworks.Api.Application.Plugins.PluginRecords)
            {
               //Append the plugin Information
               plugins.Append("Id = ");
               plugins.Append(pr.Id);
               plugins.Append(", Type = ");
               plugins.Append(pr.GetType().ToString());
               plugins.Append(", DeveloperId = ");
               plugins.Append(pr.DeveloperId);
               plugins.Append(", DisplayName = ");
               plugins.Append(pr.DisplayName);
               plugins.Append(", IsEnabled = ");
               plugins.Append(pr.IsEnabled);
               plugins.Append(", IsLoaded = ");
               plugins.Append(pr.IsLoaded);
               plugins.Append(", Name = ");
               plugins.Append(pr.Name);
               plugins.Append(", PluginOptions = ");
               plugins.Append(pr.PluginOptions.ToString());
               plugins.Append(", ToolTip = ");
               plugins.Append(pr.ToolTip);

               plugins.AppendLine();
            }
            //show the list of plugins
            MessageBox.Show(plugins.ToString());
         }
      }
0 Likes
Message 3 of 6

Anonymous
Not applicable

Thanks for your response. But where do I find my own developerID? or can I just simply use any 4 characters?

 

0 Likes
Message 4 of 6

ulski1
Collaborator
Collaborator
Accepted solution
Yes you have to decide your own 4 letters but you have the option to use a GUID instead. By using a GUID you will be more certain that others have not used the same id. As far as I know there is no central register of Autodesk developer 4 letter id, so it is safer to create a GUID

Br

Ulrik
Message 5 of 6

Anonymous
Not applicable

thank you @ulski1. Do you know how I can create a GUID?

0 Likes
Message 6 of 6

ulski1
Collaborator
Collaborator
In the visual studio top menu "tools" there is a built in GUID creator.
Br
Ulrik
0 Likes