BIM Software Tip: How to Automatically Load a DLL in AutoCAD
Question:
How can I create or use an application stored in a DLL file when the APPLOAD function does not support automatic loading?
Answer:
To automatically load DLL files in AutoCAD, follow these steps:
1. Use a file browser to navigate to the c:Program FilesAutodeskAutoCAD 20xxSupport folder.
2. Look for a file named acad20xx.lsp. If it exists, open it with a plain text editor like Notepad. If it doesn’t exist, create a new ASCII text file with that name.
3. Add the following lines to load your DLL files, updating the path according to your requirements:
(Command); _netload "c:/Folder1/folder2/my_DLL_1.DLL"
(Command); _netload "c:/Folder1/folder2/my_DLL_2.DLL"
(Command); _netload "c:/Folder1/folder2/my_DLL_3.DLL"
(Command); _netload "c:/Folder1/folder2/my_DLL_4.DLL"
4. Save the acad20xx.lsp file.
Now, every time you launch AutoCAD or open a new drawing, the specified DLLs will be loaded automatically.
Note 1: The “xx” in acad20xx.lsp corresponds to your AutoCAD version. For example, if you are using AutoCAD 2015, the file should be named acad2015.lsp.
Note 2: The DLL files must be placed in a folder included in the AUTLOADPATH variable for automatic loading without requiring user interaction.
Reference: Security Control of AutoCAD 2013 SP1 in AutoLISP and VBA.














Must log in before commenting!
Sign Up