CAD/CAM discussion forum > CAD Tutorial & Tips > drawing equations in autocad, lisp math, autolisp math functions

drawing equations in autocad, lisp math, autolisp math functions

Rank: 1

Blackfish

Newbie

posts: 11

Registered: 2012-7-6

Message 1 of 3

 drawing equations in autocad, lisp math, autolisp math functions
22-11-2013 05:27 . pm | View his/her posts only
Please guide me how drawing equations in autocad, how to do lisp math? I'd appreciated if you can show me some example of autolisp math functions. Thanks for any help.

Rank: 1

Profcad

Newbie

posts: 24

Registered: 2012-7-6

Message 2 of 3

22-11-2013 05:27 . pm | View his/her posts only
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.

Rank: 9Rank: 9Rank: 9

Jenny

Manager

posts: 481

Registered: 2013-5-6

Message 3 of 3

See also