Always Netload a dll without going through the selection dialog

Always Netload a dll without going through the selection dialog

soonhui
Advisor Advisor
1,692 Views
6 Replies
Message 1 of 7

Always Netload a dll without going through the selection dialog

soonhui
Advisor
Advisor

Here's something I find exceptionally annoying: when I Netload, I will need to select my Dll, OVER and OVER again from a file dialog box.

 

Is there anyway I can always netload a particular dll for a particular version of Autodesk product?

 

I tried to copy and paste "netload %myfilepath%" into the command line, but it doesn't work, some other random commands get invoked. 

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
0 Likes
1,693 Views
6 Replies
Replies (6)
Message 2 of 7

_gile
Consultant
Consultant

Hi

Use a LISP expression:

 

 

(command "NETLOAD" %YourFilePath%)

 

 

Note: with LISP the backslash (\) is the escape character, so you have to replace each backslash in the file path with a double backslash (\\) or a simple slash (/).

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 3 of 7

soonhui
Advisor
Advisor

@_gile ,

 

My plugin is in .Net, so loading a lisp command won't clash with it?

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
0 Likes
Message 4 of 7

_gile
Consultant
Consultant

I understood your app is in .NET (NETLOAD).

You do not have to load a LISP, just paste a LISP expression in the command line, this will avoid the dialog to open.



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

0 Likes
Message 5 of 7

soonhui
Advisor
Advisor

@_gile ,

 

Maybe I miss something but when I paste the string

 

(command "NETLOAD" "C:\Documents\mydll.dll")

 

verbatim in the command line, it simply doesn't work. Is there a guide somewhere on how to paste the lisp string correctly in the AutoCAD command line?

##########

Ngu Soon Hui

##########

I'm the Benevolent Dictator for Life for MiTS Software. Read more here


I also setup Civil WHIZ in order to share what I learnt about Civil 3D
0 Likes
Message 6 of 7

norman.yuan
Mentor
Mentor

You did not read @Anonymous' first reply carefully:

 

It should be either

 

(command "NETLOAD" "C:\\Documents\\mydll.dll")

 

or

 

(command "NETLOAD" "C:/Documents/mydll.dll")

 

 

 

Norman Yuan

Drive CAD With Code

EESignature

Message 7 of 7

NGVBA
Contributor
Contributor

Below are exerts from one of the post as below

Use the Startup Suite in AutoCAD's Application Loader to always call the plug-in or DLL at startup.

  1. Create a LSP file which calls the file in question.
  2. Place the LSP file into a folder on your computer.
  3. Add that folder location to the Trusted Locations section of the Files tab, within AutoCAD's Options.
  4. Launch AutoCAD.
  5. Use NETLOAD to load the DLL file in question.
  6. Run APPLOAD.
  7. Click the Contents button in the Startup Suite.
  8. Click Add and browse to the folder where you saved the LSP file. 

Now, when AutoCAD is launched, the LSP in the Startup Suite will call the DLL file specified within the LSP file.

 

With above the DLL shall be loaded every time you start Autocad, you only have to type the command you intend to execute.............. All the best.

0 Likes