2

I have a plugin that I have finished developing with C# .NET. Because I have multiple plugins that I want AutoCAD to load on startup, I use a Lisp script that loads all my plugins with one function call. Since this is my first of many planned .NET plugins, I'm using a Lisp program to load each DLL file. The function for that is

(defun C:LoadDLL ()
    (command "NETLOAD" "ShowHideLayers.dll")
)

where the Lisp file containing that function and ShowHideLayers.dll are both in the .bundle folder in AutoCAD's roaming data.

However, when I start AutoCAD and call LoadDLL, I get an error and have no idea why:

NETLOAD Assembly file name: ShowHideLayers.dll Unable to load ShowHideLayers.dll assembly.

I can't determine the cause of the error. What am I missing?

J0e3gan
  • 8,740
  • 10
  • 53
  • 80
Nick Gilbert
  • 4,159
  • 8
  • 43
  • 90
  • 1
    First, if you issue the NETLOAD yourself without going thru lisp, does it work? If it does, then I suspect that it's either finding a different dll with the same name, or just not finding it at all. Use findfile in Acad to make sure it can find it. If it doesn't load manually, then you may have to find the Fusion logs to see why .net didn't load your assembly. – Joel Lucsy Nov 01 '14 at 21:15
  • Why are you using lisp to load your libraries? Just register them in the applications key in the registry. You have to pass the netload command a full path. – Trae Moore Nov 06 '14 at 04:38

2 Answers2

0

http://through-the-interface.typepad.com/through_the_interface/2008/09/loading-net-mod.html

You can do it without passing commands via this method in C#.

-1

The whole point of the bundle format is for you to not have to netload DLLs. Are you sure you need to do this?