Jump to content

help ...routine LayerDirector


leonucadomi

Recommended Posts

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 by leonucadomi
Link to comment
Share on other sites

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

  • Thanks 1
Link to comment
Share on other sites

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

image.png.0be4353081aed07bd0760b4a5df12aa3.png

 

and other files do not show any error messages.

I have to load it manually and enable it.

Link to comment
Share on other sites

 

I do not know what could be.

but load the routine from cui

and here if it works

image.png.3e1d6eaf586a0af1bddfce6ef6762dbd.png

 

 

thanks

 

Link to comment
Share on other sites

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 by mhupp
  • Like 1
Link to comment
Share on other sites

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)

)

 

 

  • Like 1
Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...