- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a user that is currently unable to use my plugin. I have had similar problems before related to AutoLoading. But in this case even NetLoad does not load the plugin. This is from a fresh install of AutoCAD 2026 on Windows 11.
The bundle is located at
C:\Users\username\AppData\Roaming\Autodesk\ApplicationPlugins\MyPlugin.bundle
I tried deleting my plugin's .bundle folder, recreating the .bundle folder. The bundle has a DLL folder which has three .dlls. One is the main plugin .dll while the other two are dependencies. I tried NETLOAD'ing the two dependencies before loading the main plugin, no luck.
So I decided to step back and just try to have the user NETLOAD a .dll with this plugin after uninstalling/reinstalling AutoCAD 2026
using System.IO;
using Autodesk.AutoCAD.Runtime;
namespace AutoCAD_2025_Test_Plugin
{
public class PluginExtension : IExtensionApplication
{
public void Initialize()
{
// Add your initialization code here
}
public void Terminate()
{
// Add your termination code here
}
}
}
/////////////////////seperate files
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
[assembly: CommandClass(typeof(AutoCAD_2025_Test_Plugin.MyCommands))]
[assembly: ExtensionApplication(typeof(AutoCAD_2025_Test_Plugin.PluginExtension))]
namespace AutoCAD_2025_Test_Plugin
{
public class MyCommands
{
// The CommandMethod attribute can be applied to any public member
// function of any public class.
// The function should take no arguments and return nothing.
// If the method is an intance member then the enclosing class is
// intantiated for each document. If the member is a static member then
// the enclosing class is NOT intantiated.
//
// NOTE: CommandMethod has overloads where you can provide helpid and
// context menu.
// Modal Command with localized name
[CommandMethod("MyGroup", "MyCommand", "MyCommandLocal", CommandFlags.Modal)]
public void MyCommand() // This method can have any name
{
// Put your command code here
Document doc = AcadApp.DocumentManager.MdiActiveDocument;
Autodesk.AutoCAD.EditorInput.Editor ed;
if (doc != null)
{
ed = doc.Editor;
ed.WriteMessage("Hello, this is your first command.");
}
}
// Modal Command with pickfirst selection
[CommandMethod("MyGroup", "MyPickFirst", "MyPickFirstLocal", CommandFlags.Modal | CommandFlags.UsePickSet)]
public void MyPickFirst() // This method can have any name
{
PromptSelectionResult result = AcadApp.DocumentManager.MdiActiveDocument.Editor.GetSelection();
if (result.Status == PromptStatus.OK)
{
// There are selected entities
// Put your command using pickfirst set code here
}
else
{
// There are no selected entities
// Put your command code here
}
}
// Application Session Command with localized name
[CommandMethod("MyGroup", "MySessionCmd", "MySessionCmdLocal", CommandFlags.Modal | CommandFlags.Session)]
public void MySessionCmd() // This method can have any name
{
// Put your command code here
}
// LispFunction is similar to CommandMethod but it creates a lisp
// callable function. Many return types are supported not just string
// or integer.
[LispFunction("MyLispFunction", "MyLispFunctionLocal")]
public int MyLispFunction(ResultBuffer args) // This method can have any name
{
// Put your command code here
// Return a value to the AutoCAD Lisp Interpreter
return 1;
}
}
}
This should be as simple a "plugin" as possible. No other dependencies besides the AutoCAD dependencies and the system. I am able to NETLOAD the .dll for this plugin and run "MyCommand".
When I have the user try to NetLoad the .dll that is in their downloads folder they do not get any error that it did not load. But if they run "MyCommand" they get a command not found error.
Any idea's that I should look into for how to solve this? Thank you in advance
Solved! Go to Solution.