How load an assembly (.dll) automatically

How load an assembly (.dll) automatically

inversiones_edgar_itriago
Enthusiast Enthusiast
805 Views
3 Replies
Message 1 of 4

How load an assembly (.dll) automatically

inversiones_edgar_itriago
Enthusiast
Enthusiast

Hi, how can I load an assembly (.dll) automatically when opening autocad or in every file that be opened?

0 Likes
806 Views
3 Replies
Replies (3)
Message 2 of 4

_gile
Consultant
Consultant

Hi,

 

The simplest way is to add a (command "_.netload" ...) LISP expression to the 'acad.lsp' file.

 

You can also register the assembly in the Windows registry.

 

But, IMHO, the Autoloader mechanism (requires AutoCAD 2012 or later) is the most powerful while remaining simple to set up.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 3 of 4

JamesMaeding
Advisor
Advisor

Gile, another ingredient I commonly have to walk other companies through, is modifying the acad.exe.config file to allow loading from "remote locations" or whatever.

It seems like I have to do that for most companies I share tools with.

Is that the same for you, and am I doing things wrong?

You can imagine that config file is in program files folder so needs admin rights to edit it, not always easy to get at other companies.

thx


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes
Message 4 of 4

JamesMaeding
Advisor
Advisor

wow, so thanks to your link Gile, I finally read what the autoloader mechanism is.

I always knew about the bundle folders but did not realize those locations are kind of special.

 

So if someone really wanted to mess up a user, they make some prog, put it there, and it runs but the user cannot delete as its an admin location.

The idea of admin lockdown is actually good, but there needs to be a better mechanism to enable the admin rights when needed.

I use run as admin, run as different user...but those only work when running something.

I may need to have a user copy and paste or rename stuff in admin locked folders so I'm always looking for better ideas on that.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes