drawing equations in autocad, lisp math, autolisp math functions
http://www.zwsoft.com/forum/viewthread.php?tid=3256
Please guide me how [b]drawing equations in autocad, [/b]how to do [b]lisp math[/b]? I'd appreciated if you can show me some example of [b]autolisp math functions[/b]. Thanks for any help.Blackfish2013-11-22 17:27:04http://www.zwsoft.com/forum/viewthread.php?tid=3256&pid=19145
we can create equations in autocad by using lisp code (typed on the command line) and the format is as follows (include parentheses):
(+ 2 5) ......... = 7
(- 12 3) ....... = 9
(/ 36 12) ..... = 3
You can get complex with the code:
(+ (/ (- 15 6) 2.5) 16) ....... = 19.6
and if you want to store the result, store it to a local variable
(setq var (+ (/ (- 15 6) 2.5) 16))
stores the result to local variable var, which can be recalled by typing !var at the command line.Profcad2013-11-22 17:27:33