When to do a boring job in AutoCAD is counting on the facade of a house, how many types of panels, each sized panels, how much, and how many sheets each. On the stand, each plate is a rectangle Polyline command is generated by (4 edges).
Maybe you have not seen
(defun c:tkt( / lstTam ss pp) (defun prone(ent / tt p1 p2 p3 x1 x2 y1 y2 cothem H W) (defun them(dt) (if (equal W (car dt) 1.0) (if (equal H (cadr dt) 1.0) (progn (setq cothem t) (list W H (1+ (caddr dt))) ) dt ) dt ) ) (setq tt (entget ent) p1 (assoc 10 tt) tt (cdr (member p1 tt)) p2 (assoc 10 tt) tt (cdr (member p2 tt)) p3 (assoc 10 tt) p1 (cdr p1) p3 (cdr p3) x1 (car p1) x2 (car p3) y1 (cadr p1) y2 (cadr p3) W (abs (- x1 x2)) H (abs (- y1 y2)) cothem nil lstTam (mapcar 'them lstTam) ) (if (not cothem) (setq lsttam (append lsttam (list (list W H 1)) ) ) ) ) ;;-------- Main ------------------ (princ "\nCADViet.com (c) 2007") (princ "\nHay chon tam: ") (setq ss (ssget '((0 . "LWPOLYLINE") (90 . 4)) ) lstTam nil ) (sudung prone ss) (princ "\nSo luong cac tam:") (foreach pp lsttam (princ (strcat "\n" (rtos (car pp)) "x" (rtos (cadr pp)) ": " (itoa (caddr pp)) " tam")) ) (princ) ) (princ "\ntkt - free lisp ") (princ)