autolisp Posted October 30, 2010 Posted October 30, 2010 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 Quote
Lee Mac Posted October 30, 2010 Posted October 30, 2010 [color=red]Subfunction:[/color] (MySubfunction) [color=red]Subfunction with Arguments:[/color] (MySubfunction arg1 arg2 arg3 ... argN) [color=red]Main function:[/color] (c:MyFunction) Quote
autolisp Posted October 30, 2010 Author Posted October 30, 2010 [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 Quote
Lee Mac Posted October 30, 2010 Posted October 30, 2010 (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) ) Quote
yawningcaptain Posted October 30, 2010 Posted October 30, 2010 1>xyz.lsp> (defun aaa (princ) ) (defun main (princ) ) (main) (defun c:aaa2 (aaa) ) 2>abc.lsp> (load xyz.lsp) (aaa2) Quote
Recommended Posts
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.