Community
Navisworks API
Welcome to Autodesk’s Navisworks API Forums. Share your knowledge, ask questions, and explore popular Navisworks API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

the command line action failed: The Plugin was not found

1 REPLY 1
SOLVED
Reply
Message 1 of 2
matiH7HD9
253 Views, 1 Reply

the command line action failed: The Plugin was not found

Hi, need help

 

Problem statement: when i run a plugin that i build, any plugin, I Recive Following message, X the command line action failed: The Plugin was not found (attached picture)

 

it's happend with any code, so i try the basic plugin as debugging proccess

 

Thanks in advance, Mati.

 

Plugin location:

 C:\Program Files\Autodesk\Navisworks Manage 2024\Plugins\BasicPlugIn.ABasicPlugin\BasicPlugIn.ABasicPlugin.dll

 

Roamer

"C:\Program Files\Autodesk\Navisworks Manage 2024\Roamer.exe" -OpenFile "C:\File.nwd" -ExecuteAddInPlugin "BasicPlugIn.ABasicPlugin"

 

Sequence:

open navisworks-> Open file-> Execute plugin (

 

Code

#region HelloWorld

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Text;

 

//Add two new namespaces
using Autodesk.Navisworks.Api;
using Autodesk.Navisworks.Api.Plugins;


namespace BasicPlugIn
{
[PluginAttribute("BasicPlugIn.ABasicPlugin", //Plugin name
"ADSK", //4 character Developer ID or GUID
ToolTip = "BasicPlugIn.ABasicPlugin tool tip",//The tooltip for the item in the ribbon
DisplayName = "Hello World Plugin")] //Display name for the Plugin in the Ribbon

public class ABasicPlugin : AddInPlugin //Derives from AddInPlugin
{
public override int Execute(params string[] parameters)
{
MessageBox.Show(Autodesk.Navisworks.Api.Application.Gui.MainWindow, "Hello World");
return 0;
}
}
}
#endregion

 

Version:

Navisworks 2014

Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.9.5

 

Reference:

Property Value

(Name)Autodesk.Navisworks.Api
Aliasesglobal
Copy LocalTrue
Culture 
DescriptionAutodesk.Navisworks.Api
Embed Interop TypesFalse
File TypeAssembly
IdentityAutodesk.Navisworks.Api
PathC:\Program Files\Autodesk\Navisworks Manage 2024\Autodesk.Navisworks.Api.dll
ResolvedTrue
Runtime Versionv4.0.30319
Specific VersionFalse
Strong NameTrue
Version21.0.0.0

 

Visual studio:

Property Value

Assembly nameBasicPlugin.ABasicPlugin
Default namespaceBasicPlugin.ABasicPlugin
Target framework.NET Framework 4.8
Output typeClass Library
Auto-generate binding redirects(Not set)
Startup object(Not set)

 

 

 

1 REPLY 1
Message 2 of 2
naveen.kumar.t
in reply to: matiH7HD9

Hi @matiH7HD9 ,

 

You need to first load the DLL into Navisworks if the plugin is not found in the Plugins folder in the installation directory. To load the DLL into Navisworks, you need to use "-AddPluginAssembly" and then use "-ExecuteAddInPlugin".

Sample code:

namespace Navisworks_2024
{   
  [PluginAttribute("Navisworks2024",                 "ADSK2", ToolTip = "NW-2024",                DisplayName = "My Plugin")] 
   
    public class Class1 : AddInPlugin
    {
        public override int Execute(params string[] parameters)
        {
            Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument;
            MessageBox.Show("Message");
            return 1;
        }
    }      
}


CommandLine:

"C:\Program Files\Autodesk\Navisworks Manage 2024\roamer.exe" -AddPluginAssembly "C:\..Your dll path here..\Navisworks 2024.dll" -ExecuteAddInPlugin "Navisworks2024.ADSK2" 

 


Naveen Kumar T
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report