Jump to content

How to call lisp to another lisp


autolisp

Recommended Posts

Dear all

How to call lisp to another lisp

I want startup lisp abc.lsp execute my main lisp xyz.lsp

& another question startup lisp abc.lsp execute my xyz.lsp internal command : aaa

Link to comment
Share on other sites

[color=red]Subfunction:[/color]

(MySubfunction)

[color=red]Subfunction with Arguments:[/color]

(MySubfunction arg1 arg2 arg3 ... argN)

[color=red]Main function:[/color]

(c:MyFunction)

Link to comment
Share on other sites

[color=red]Subfunction:[/color]

(MySubfunction)

[color=red]Subfunction with Arguments:[/color]

(MySubfunction arg1 arg2 arg3 ... argN)

[color=red]Main function:[/color]

(c:MyFunction)

Dear sir

Thx for reply

it's possible give example

Link to comment
Share on other sites

(defun c:main ( )
 (print (DoMath 3.4)) ;; Call subfunction with arguments
 (c:main2) ;; Call main function
 (princ)
)

(defun DoMath ( x ) (sqrt (+ x 4.0)))

(defun c:main2 ( )
 (alert "Main2 Executed")
 (princ)
)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...