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

Link multiple functions/routines?

7 REPLIES 7
Reply
Message 1 of 8
melissa
289 Views, 7 Replies

Link multiple functions/routines?

I have written 8 individual routines/functions in 8 different .lsp files. Now, I would like to write a routine that calls the sequential execution of each routine one after another.This will mean simplification on the user part as user only have to run one file to get all 8 routines/functions running. How do I do that? Any ideas anyone?

Rgds,
Melissa
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: melissa

Assuming they are all loaded you could add the function call at the end of
each lisp.

For example....
(defun C:Lisp1 ()
.... program here ....
) ; end of lisp

(defun C:Lisp2 ()
.... program here ....
) ; end of lisp

Do this .....
(defun C:Lisp1 ()
.... program here ....
(C:Lisp2)
) ; end of lisp

(defun C:Lisp2 ()
.... program here ....
(C:Lisp3)
) ; end of lisp

You could modify the eight different lisp progams to be eight functions of
the same file and so on ...

For the best answers, zip up the coding and post them to the customer files
area so we can see them....

Customer Files is an area for upload of problem files for review or sharing.
Users are asked to zip any files prior to uploading to conserve download
time and server space.

For NNTP newsgroup readers the Customer-files newsgroup can be found at
news://discussion.autodesk.com/autodesk.autocad.customer-files.

--

Chip Harper
Member of the AutoDesk Discussion Forum Moderator Program
Message 3 of 8
Anonymous
in reply to: melissa

oops, forgot the http link ...

You may also access the customer-files group via the HTTP web-based forums
at http://discussion.autodesk.com/WebX?14@@.ee940b5.

--

Chip Harper
Member of the AutoDesk Discussion Forum Moderator Program
Message 4 of 8
melissa
in reply to: melissa

Hi I have tried this, this case i tried to link 2 routines to run within a single file:

(defun c:auto_dim()

(defun c:longest())

(defun c:cornerwires())

)

However, after I load in auto_dim, at the autocad command prompt, i still need to type longest & cornerwires to run the individual routines..Is there a way to run both routines with a single command, like after i type auto_dim?

Rgds,
Melissa
Message 5 of 8
melissa
in reply to: melissa

I tried ur 2nd suggestion..it works..thanks 🙂

Rgds,
Melissa
Message 6 of 8
Anonymous
in reply to: melissa

Welcome 🙂

--

Chip Harper
Member of the AutoDesk Discussion Forum Moderator Program
Message 7 of 8
Anonymous
in reply to: melissa

Melissa,

Unless you always need the 8 different functions to
operate as

one, then a ninth function that executes the others
would perhaps

be a better choice.  In a ninth
file:

 

(defun c:cmd9()

   (c:cmd1)

   (c:cmd2)

   .....

   (c:cmd8)
  
(princ))

 

(load "fileofcmd1")

(load "fileofcmd2")

....

(load "fileof cmd8")

(princ "all files loaded")(princ)

 

 

 

 


style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
I
tried ur 2nd suggestion..it works..thanks 🙂

Rgds,
Melissa

Message 8 of 8
hidden_intuition
in reply to: melissa

I am having this same issue and this link doesn't work. What was the solution to this problem?

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

Post to forums  

Autodesk Design & Make Report

”Boost