TheSwamp

Code Red => .NET => Topic started by: Nima2018 on April 15, 2018, 09:24:18 AM

Title: Load assembly
Post by: Nima2018 on April 15, 2018, 09:24:18 AM
Hi dear members
Is it possible load and run an assembly by Autolisp code ?
Title: Re: Load assembly
Post by: n.yuan on April 15, 2018, 09:34:51 AM
(command "._NETLOAD" "[path]\\MyAddinAssembly.dll")

Note: make sure the path is a trusted location, unless it is beneath "C;\Program files\" folder.
Title: Re: Load assembly
Post by: Nima2018 on April 15, 2018, 10:29:32 AM
Thanks Yuan for reply , I was thinking about find file instead of writing  path adress !
Title: Re: Load assembly
Post by: n.yuan on April 16, 2018, 10:16:07 AM
Surely you can use FindFile:

(command "._NETLOAD" (FindFile "MyAddinAssembly.dll"))

You still need to make the folder of the DLL file "trusted", besides the folder being one of the support paths.