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

ACADDOC.lsp & Reactor.lsp

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
jason.estas
423 Views, 4 Replies

ACADDOC.lsp & Reactor.lsp

G'day,

 

I'm trying to load a reactor.lsp program at the start of opening a drawing. I have other lsp files loading but not a lsp with a reactor program in it.

 

It was working previously from the same ACADDOC.lsp but not now.

 

I have tried using the following:

 

(load "reactor.lsp") and (load "reactor.lsp" "Reactor has not loaded")

 

But neither has worked. But when I use the APPLOAD from within the drawing, the reactor.lsp program works.

 

Any suggestions?

 

Thank you in Advance for you help!!

 

Jason

4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: jason.estas

Jason,

 

First up, is reactor.lsp in your search path?

 

Second, comment out the (vlr- staement - replace it with (alert "reactor loaded"). Now try again - does it work?

 

S

Message 3 of 5
Moshe-A
in reply to: jason.estas

Jason,

 

if the lisp does load from application load (appload)

then your problem is the support file search path

 

just add the folder to the support file search path (through OPTIONS)

and you are done

 

Cheers

Moshe 

Message 4 of 5
jason.estas
in reply to: jason.estas

Thank you guys!

 

It would appear that the folder which housed the Lisp routines had gone missing from the support files.

 

Thank you again for your help!

 

Jason

Message 5 of 5
Anonymous
in reply to: jason.estas

Jason,

 

I prefer to use explicit folder names rather than having to ensure that every user has the same support path structure. It's far easier to just email round a new acaddoc.lsp (which, admittedly, could have code for setting the support path in it).

 

What the code below does is look for a certain path and load the files from whichever it finds first:

 

(vl-load-com)
(cond
  ((setq bT_dir (findfile "D:\\blueTOOLS\\lisp"))); my local files ;
  ((setq bT_dir (findfile "G:\\blueTOOLS\\lisp"))); my roaming files ;
  ((setq bT_dir (findfile "C:\\Program Files\\blueTOOLS"))); network users ;
  (T nil)
  )
(if bT_dir
  (progn
    (princ "\n-------------------------------")
    (princ "\nLoading blueTOOLS...")
      (setq bT_files (vl-directory-files bT_dir "blueTOOLS_*.lsp")
     bT_files (acad_strlsort bT_files)
     bT_count 0
     )
      (repeat (length bT_files)
 (load (strcat bT_dir "\\" (nth bT_count bT_files)))
 ;(PRINC (strcat "\n" (nth bT_count bT_files)))

 ; ^ use this line to locate an erroneous file ;
 (setq bT_count (1+ bT_count))
 )
    (princ "\nComplete!")
    (princ "\n-------------------------------\n")
    )
  )
(princ)

 

S

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

Post to forums  

Autodesk Design & Make Report

”Boost