Visual LISP, AutoLISP and General Customization

Reply
Valued Contributor
golf32902
Posts: 60
Registered: ‎12-01-2008
Message 1 of 3 (206 Views)

Load lisp form lisp

206 Views, 2 Replies
11-26-2012 09:52 AM

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
)

*Expert Elite*
Kent1Cooper
Posts: 5,293
Registered: ‎09-13-2004
Message 2 of 3 (197 Views)

Re: Load lisp form lisp

11-26-2012 11:02 AM 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
Distinguished Mentor
Moshe-A
Posts: 739
Registered: ‎09-14-2003
Message 3 of 3 (196 Views)

Re: Load lisp form lisp

11-26-2012 11:02 AM 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

 

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community