Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

New lisp file added to plugin folder not loading, but existing ones are?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
nshupeFMPE3
625 Views, 8 Replies

New lisp file added to plugin folder not loading, but existing ones are?

I am now maintaining an existing plugin that came with a few lisp files in the MyPlugin.bundle folder. These get AutoLoaded it seems, as I dont see any reference to them in the PackageContent.xml file or anything. I can make changes to those lisp files while keeping the names of the files the same and the changes will be reflected when I load AutoCAD. 

But I have created a brand new lisp file for a new command, and it is in the same location as the other lisp files. But the new one is not AutoLoading?

I'd like to have it AutoLoad so that when I distribute the plugin to the others in my department, they dont have to do anything extra. 

I wasn't sure if adding the lisp file in the custom cui (also part of the plugin) would work given how complicated file paths can be.

Thanks!

Labels (4)
8 REPLIES 8
Message 2 of 9
Sea-Haven
in reply to: nshupeFMPE3

Check your xml file and have a look at what is autoloading.

Message 3 of 9
nshupeFMPE3
in reply to: Sea-Haven

Thank you for the suggestion, I did check that and there is no mention of the other lisp files in there.
Message 4 of 9

See if you don't have lines of code like below.

 

(autoload "FileLspWithoutExtention" '("Command1" "Command2"))

 

https://documentation.help/AutoLISP-Functions/WS1a9193826455f5ff1a32d8d10ebc6b7ccc-6a96.htm

 

or a line of code (load "file.lsp")

Didier LOURDELLE, Formateur & Développeur ADN Autodesk
AutoCAD LT, AutoCAD, AutoCAD Electrical, Revit
VB.net, Visual Lisp, VBA


Message 5 of 9

Thank you for the idea. Unfortunately I dont see anything in our .Net C# code, any Lisp code (even those that are AutoLoading), the custom CUI, or the PackageContents.xml file for the plugin.
Message 6 of 9

Ok I found it! I had no idea what .mnl files where and there is one in the plugin folder. I noticed a note about .mnl files under the cui menu where it says information it states " Note: MNL files with the same name and location as your main, enterprise, or partial customization files are loaded automatically; these files cannot be removed."
Message 7 of 9
TomBeauford
in reply to: nshupeFMPE3

MNL files work great for loading lisp for a command in a CUIX file. Keep in mind many of the CUIX files installed with AutoCAD products already come with MNL files that may be overwritten by an update. I wouldn't recommend going that route unless you're adding that MNL file for your own custom CUIX file. Create an acaddoc.lsp file (if you don't have one) which automatically loads in any drawing you open and load your lisp in it.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
Message 8 of 9
Sea-Haven
in reply to: TomBeauford

I have spent to many years with Acad and just do not add anything to acad & acaddoc.lsp or use any mnl, same as I dont edit the acad.cui's the cui editor is a pain much easier just making custom menu's with notepad, the Ribbon unfortunately was not exposed as a mnu. You can though unpack a cuix just copy and rename to .zip you may be surprised what is in the zip.

 

The entanglement of the Ribbon is like 4 xml files rather than just one, have looked at doing a lisp to create. 

Message 9 of 9
TomBeauford
in reply to: Sea-Haven

I liked working with MNU files from versions r12 thru 2005 and found editing the CUI files in 2006 frustrating. Civil 3D workflows weren't added to the ribbon until version 2011 but the many advantages of using the ribbon convinced me to adjust to using the CUI interface for customization. 

I mostly use acaddoc.lsp for checking system variables and setting modemacro for information displayed on the Status Bar and only preload a handful of lisp routines. Most are loaded when the macro commands are called or by autoload.

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost