Author Topic: Load assembly  (Read 89 times)

0 Members and 1 Guest are viewing this topic.

Nima2018

  • Mosquito
  • Posts: 2
Load assembly
« on: April 15, 2018, 09:24:18 AM »
Hi dear members
Is it possible load and run an assembly by Autolisp code ?

n.yuan

  • Bull Frog
  • Posts: 253
Re: Load assembly
« Reply #1 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.

Nima2018

  • Mosquito
  • Posts: 2
Re: Load assembly
« Reply #2 on: April 15, 2018, 10:29:32 AM »
Thanks Yuan for reply , I was thinking about find file instead of writing  path adress !

n.yuan

  • Bull Frog
  • Posts: 253
Re: Load assembly
« Reply #3 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.