autolisp Posted October 30, 2010 Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted October 30, 2010 Share 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 Link to comment Share on other sites More sharing options...
autolisp Posted October 30, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted October 30, 2010 Share 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 Link to comment Share on other sites More sharing options...
yawningcaptain Posted October 30, 2010 Share 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 Link to comment Share on other sites More sharing options...
autolisp Posted November 1, 2010 Author Share Posted November 1, 2010 dear sir thx for reply Quote Link to comment Share on other sites More sharing options...
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.