Autocad Lisp For Area Average ratng: 7,1/10 6416 votes
Lisp

Sep 27, 2017 - Thanks for your link, but your lisp doesn`t put the area value on each hatch. Vida The unit is correct but it gives the wrong value of the area. Nov 10, 2018 - I'm looking for a lisp routine or command that will calculate area of a closed polyline and place text with the area value at the center of the.

As an imitation of the Rectang command in 2010. (defun c:arec ( / an ar p1 x ) (if (and (setq p1 (getpoint ' nSpecify first corner point: ')) (progn (initget 6) (setq ar (getreal ' nSpecify Area for Rectangle: ')) ) (progn (initget 'Length Width') (setq an (getkword ' nCalculate rectangle dimensions based on [Length/Width]: ')) (if (eq 'Width' an) (setq x (getdist ' nSpecify rectangle width: ' p1)) (setq x (getdist ' nSpecify rectangle length: 'p1)) ) ) ) (command '_.rectang' '_non' p1 '_non' (polar (polar p1 (if (eq 'Width' an) 0. (/ pi 2.)) x) (if (eq 'Width' an) (/ pi 2.) 0.) (/ ar x) ) ) ) (princ) ). (defun c:arec ( / an ar p1 x ) (if (and (setq p1 (getpoint ' nSpecify first corner point: ')) (progn (initget 6) (setq ar (getreal ' nSpecify Area for Rectangle: ')) ) (progn (initget 'Length Width') (setq an (getkword ' nCalculate rectangle dimensions based on [Length/Width]: ')) (if (eq 'Width' an) (setq x (getdist ' nSpecify rectangle width: ' p1)) (setq x (getdist ' nSpecify rectangle length: 'p1)) ) ) ) (command '_.rectang' '_non' p1 '_non' (polar (polar p1 (if (eq 'Width' an) 0.

(/ pi 2.)) (* x 12.)) (if (eq 'Width' an) (/ pi 2.) 0.) (* 12. (/ ar x)) ) ) ) (princ) ).