Type ZP then enter to test if your program hasn’t loaded yet. It should say: Unknown command “ZP”. Press F1 for help. If it’s not, close AutoCAD and open it again. Do not load your program for now. Open Visual LISP editor. In defun line, modify it to this. (defun c:ZP (/ ZPT MRAT) Now load your program.
I have a plugin that I have finished developing with C# .NET. Because I have multiple plugins that I want AutoCAD to load on startup, I use a Lisp script that loads all my plugins with one function call. Since this is my first of many planned .NET plugins, I'm using a Lisp program to load each DLL file. The function for that is
where the Lisp file containing that function and ShowHideLayers.dll are both in the .bundle folder in AutoCAD's roaming data.
However, when I start AutoCAD and call LoadDLL, I get an error and have no idea why:
I can't determine the cause of the error. What am I missing?
Do the following in order, testing if the issue is solved after each:
Ensure that all available AutoCAD updates are installed (see: Where to get Product Updates, Add-ons, and Enhancements).
Fix missing support paths.
Enter OPTIONS on the command line and press Enter, or click Options under the Application menu.
Click on the Files tab.
Expand the Support File Search Paths entry.
If the following path is not present, add it:
C:Program filesAutodesk<product>support<language>
Note: This is normally listed right after C:Program filesAutodesk<product>support. Be sure to edit this path for your version of AutoCAD and for the correct language. For example, the last folder should be de-DE for German, en-US for American English, etc.
Click OK on the Options window.
Reset the CUI (see How to reset the CUIx in AutoCAD).
Reset AutoCAD to defaults (see How to reset AutoCAD to defaults).
Note: In case Civil 3D is used the standard AutoCAD procedure to reset the user profiles cannot be applied. Instead follow the instructions in the knowledge base article: Resolving user specific issues by resetting AutoCAD Civil 3D 2020
Additionally, for all AutoCAD products except AutoCAD LT, Check ObjectARX loading:
Enter OPTIONS on the command line and press Enter, or click Options under the Application menu.