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

Load lisp form lisp

2 REPLIES 2
Reply
Message 1 of 3
golf32902
541 Views, 2 Replies

Load lisp form lisp

Ok I dont know if anyone had tried this but I would like to try this..

 

Im looking for a way to load lisp form a lisp.

 

;;; This lisp is to load all lisps.

(defun c:Loadlisp1 ()
  (if (not (tblsearch "XXXXXXXXX" "XXXXXX"))   ;This is to search is the lisp is already loaded.

    (progn
      (prompt "n\Arch_Undeter.vlx")
      (load "X:\\Staff\\Jon Young TEMP\\Auto CAD\\AutoCAD Add-ons\\Lisp Routains\\Arch_Undeter.vlx")
    )     ;progn
  )     ;if
)

2 REPLIES 2
Message 2 of 3
Kent1Cooper
in reply to: golf32902


@golf32902 wrote:

....

Im looking for a way to load lisp form a lisp.

 

....

  (if (not (tblsearch "XXXXXXXXX" "XXXXXX"))   ;This is to search is the lisp is already loaded.

  ....

      (load "....\\Arch_Undeter.vlx")

....


If that's a "separate-namespace" VLX routine, you should be able to use the (vl-vlx-loaded-p) function.  Otherwise, I'm not sure how to check, except that I don't think (tblsearch) can do it [see the list of valid table names under (tblnext)].

Kent Cooper, AIA
Message 3 of 3
Moshe-A
in reply to: golf32902

Golf Hi,

 

this is not the way to do it

 

if you have the source lisp file and you can look inside to see the function names.... than

suppose you have lisp file called mylib.lsp and inside there is function there called (myfunc)

 

you can do something like this:

 

(if (null myfunc)

 (load "mylib")

)

 

if you got a fas / vlx file then you need know at least one function name inside

otherwise it is more complicated cause you need the list of loaded lisp files (applications)

search here for APPLOAD (i recall we disscused about this a few years ago) the appload

function holds the application list (lsp + fas + vlx + mnl + arx) and this (i think) maybe found

in registry

 

cheers

moshe

 

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

Post to forums  

Autodesk Design & Make Report

”Boost