PDA

View Full Version : Autocad only load some of the lisp files from acaddoc.lsp


boesiii
2006-07-19, 10:09 PM
On another users computer, only half of the lisp routines load automatically. I have them oad through acaddoc.lsp. I checked for other versions of the file in other support directories and didn't find anything.

rkmcswain
2006-07-19, 10:44 PM
Try (findfile "acaddoc.lsp") to find out which file it's actually loading.

Different files may be found (and then loaded) based on the support paths in a particular profile also.

If they are reading the same file, it's possible that there is a reference in the file to something that doesn't exist on one computer (like a variable, or access to a network location, etc) - and then the "acaddoc.lsp" bombs out and the remainder of the code never loads.

Wanderer
2006-07-20, 06:12 PM
I'm going to move this from the CAD Management forum to this one, as I believe it will be better served here. Thank you. :) On another users computer, only half of the lisp routines load automatically. I have them oad through acaddoc.lsp. I checked for other versions of the file in other support directories and didn't find anything.

boesiii
2006-07-20, 10:04 PM
Thanks Mcswain, I found an errant acaddoc.lsp file that shouldn't have been there.

paulmcz
2006-07-20, 10:22 PM
I had the same problem before. Since I included "not found" [like this: (load "weldsym" "not found")] in all the loading calls, I never had that problem. In case that acaddoc.lsp can't load the routine, it goes on and loads the rest.

Adesu
2006-07-21, 01:38 AM
I had the same problem before. Since I included "not found" [like this: (load "weldsym" "not found")] in all the loading calls, I never had that problem. In case that acaddoc.lsp can't load the routine, it goes on and loads the rest.

Hi paulmcz,
I have a trick to load alls routine program,to our Autocad session,I'm not loading alls my routine program to "Startup Suite",but only one program,with that program I only enough to memorize that code.
I have about 383 pcs program until now,with only one load program,whole the my program would load to Autocad session,it's easy and simple.

paulmcz
2006-07-21, 03:41 AM
Hi paulmcz,
I have a trick to load alls routine program,to our Autocad session,I'm not loading alls my routine program to "Startup Suite",but only one program,with that program I only enough to memorize that code.
I have about 383 pcs program until now,with only one load program,whole the my program would load to Autocad session,it's easy and simple.

I am not sure I understood well Adesu.
What is the trick then? How do you load 383 routines in one shot?
Would you mind sharing the code?

Adesu
2006-07-25, 07:16 AM
I am not sure I understood well Adesu.
What is the trick then? How do you load 383 routines in one shot?
Would you mind sharing the code?

Hi paulmcz,
I'm sorry for late to asnwering to you,because my computer still "hang",here my code to load alls the program,I hope this code can help you,then you should change variable "file_folder" as your file location.

; lap is stand for Loading Alls Program
; Design by : Adesu <Ade Suharna>
; Email : mteybid@yuasabattery.co.id
; Homepage : http://www.yuasa-battery.co.id
; Create : 20 July 2006
; Program no.: 0383/07/2006
; Edit by :

(defun c:lap (/ all_file_name file_folder load_name)
(vl-load-com)
(setq file_folder "D:/YBI/Program/AutoLisp/Lisp program/My Alls Program")
(setq all_file_name (cddr (vl-directory-files file_folder)))
(setq all_file_name
(mapcar '(lambda (x)(nth x all_file_name))
(vl-sort-i all_file_name '<)))
(foreach x all_file_name
(setq load_name (strcat file_folder "/" x))
(load load_name)
) ; foreach
(princ)
)

abdulhuck
2006-07-25, 12:29 PM
Hi paulmcz,
I have a trick to load alls routine program,to our Autocad session,I'm not loading alls my routine program to "Startup Suite",but only one program,with that program I only enough to memorize that code.
I have about 383 pcs program until now,with only one load program,whole the my program would load to Autocad session,it's easy and simple.
Instead of pre-loading all the programs to the memory and consuming the system resources, why not think about the "autoload" function, which will load the required lisp file only when the specific command is invoked?

The following portion is from AutoCAD Developer Documentation.

The following causes AutoCAD to load the bonusapp.lsp file the first time the APP1, APP2, or APP3 commands are entered at the Command prompt:
(autoload "BONUSAPP" '("APP1" "APP2" "APP3"))

You need to add the lisp folder to your support file search path.

Regards,
Abdul Huck

paulmcz
2006-07-25, 12:30 PM
Very nice Adesu! Thanks for sharing.

Adesu
2006-07-26, 12:43 AM
Very nice Adesu! Thanks for sharing.

you are welcome