Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
Posts: 42
Registered: ‎06-16-2003
Message 1 of 8 (53 Views)

Link multiple functions/routines?

53 Views, 7 Replies
06-15-2003 10:43 AM
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
*Harper, Chip
Message 2 of 8 (53 Views)

Re: Link multiple functions/routines?

06-15-2003 11:15 AM 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
*Harper, Chip
Message 3 of 8 (53 Views)

Re:

06-15-2003 11:18 AM 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
Active Contributor
Posts: 42
Registered: ‎06-16-2003
Message 4 of 8 (53 Views)

Re:

06-15-2003 11:52 AM 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
Active Contributor
Posts: 42
Registered: ‎06-16-2003
Message 5 of 8 (53 Views)

Re:

06-15-2003 12:17 PM in reply to: melissa
I tried ur 2nd suggestion..it works..thanks :smileyhappy:

Rgds,
Melissa
*Harper, Chip
Message 6 of 8 (53 Views)

Re:

06-15-2003 12:23 PM in reply to: melissa
Welcome :-)

--

Chip Harper
Member of the AutoDesk Discussion Forum Moderator Program
*Broad, Doug
Message 7 of 8 (53 Views)

Re:

06-15-2003 08:26 PM 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 :smileyhappy:

Rgds,
Melissa

Valued Contributor
Posts: 94
Registered: ‎05-12-2005
Message 8 of 8 (53 Views)

Re:

05-08-2007 05:51 AM in reply to: melissa
I am having this same issue and this link doesn't work. What was the solution to this problem?

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
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

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

Ask the Community