leonucadomi Posted July 11, 2023 Posted July 11, 2023 (edited) hello: i am using the routine LayerDirectorV1-9 from the master LEE MAC , the problem is that in some files it loads and executes without any problem, but in others it does not load, I think it is some variable of the files. ah and this happens to me with another routine too. help please. LayerDirectorV1-9.lsp Edited July 11, 2023 by leonucadomi Quote
Steven P Posted July 11, 2023 Posted July 11, 2023 When the LISPs do not run, are there any error messages in the command line, does it always happen to the same drawing (or will closing, opening and trying again on the drawing make it work for example) "This does not work" doesn't really help you see 1 Quote
leonucadomi Posted July 11, 2023 Author Posted July 11, 2023 24 minutes ago, Steven P said: When the LISPs do not run, are there any error messages in the command line, does it always happen to the same drawing (or will closing, opening and trying again on the drawing make it work for example) "This does not work" doesn't really help you see some files load it and enable it and it shows this and other files do not show any error messages. I have to load it manually and enable it. Quote
leonucadomi Posted July 11, 2023 Author Posted July 11, 2023 I do not know what could be. but load the routine from cui and here if it works thanks Quote
mhupp Posted July 11, 2023 Posted July 11, 2023 (edited) Several ways to load lisps here. I always loaded them using the the acad.lsp file method. because It would also set several variables as well. Only used CUI to set shortcuts keys. -edit Remember something about lisp having to be in a trusted folder to autoload or something. Edited July 11, 2023 by mhupp 1 Quote
Steven P Posted July 12, 2023 Posted July 12, 2023 Similar to MHUPP - I don't think it is the LISP that is at fault, more the way it is loaded. Couple of thoughts, download it again just in case the file has a confused file extension somehow (windows does do odd things every now and then), or open in notepad or similar and save as *.* file type with the .lsp in the file name Try putting the LISP in the appload start-up suit Try putting the load instructions in acad.lsp file (which should load every time) I tend to use the startup suit, having my LISPs in my personal area of the works file stores (that way a change of CAD installation won't wipe out anything important and I can jump on any computer and still have access to them). If they still don;t load I use appreload (below) to load everything in that folder: (defun c:appreload ( / lspname myfiles acount mylistlength Failedtoload) ;;Re-load named LISP files (setq MyLispFolder "c:\\") ; your LISP diorectory (setq myfiles (vl-directory-files mylispfolder "*.lsp" nil)) ;;myfiles is list of files in mylispfolder location (setq mylistlength (length myfiles)) ;;count of number of lsp files (setq acount -1) (repeat mylistlength (setq acount (1+ acount)) (setq FailedtoLoad (strcat (nth acount myfiles) " failed to load")) (load (strcat mylispfolder (nth acount myfiles)) FailedtoLoad) ;;Loads each LISP file ) (princ "\n") (princ mylistlength) (princ " lsp files loaded from ") (princ mylispfolder) (princ) ) 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.