jiji joseph Posted April 30, 2012 Posted April 30, 2012 (edited) (defun c:zone ( / ss la rv i tv op en) (while (not ss) (princ "\nPick any object on the required layer") (setq ss (ssget))) (initget "Length Area") (setq rv (getkword "\nWould you like to measure Length/ : ")) (and (not rv) (setq rv "Area")) (setq la (cdr (assoc 8 (entget (ssname ss 0)))) ss (ssget "X" (list (cons 0 "*POLYLINE") (cons 8 la))) i (sslength ss) tv 0 op 0) (while (not (minusp (setq i (1- i)))) (setq en (ssname ss i)) (command "_.AREA" "_E" en) (cond ((= rv "Length") (setq tv (+ tv (getvar "PERIMETER")))) (T (setq tv (+ tv (getvar "AREA"))) (if (/= (logand (cdr (assoc 70 (entget en))) 1) 1) (setq op (1+ op)))))) (princ (strcat "\nTotal " rv " for layer " la " = " (rtos tv 2 2) " in " (itoa (sslength ss)) " polylines\n" (if (/= rv "Length") (strcat (itoa op) " with open polylines") ""))) (prin1)) i create this lisp in autocad 2008 for . can explain what is the next step ? Edited April 30, 2012 by jiji joseph lost some words Quote
ReMark Posted April 30, 2012 Posted April 30, 2012 Jiji: Is your lisp routine a response to the main question of this thread or are you looking for help on a totally different subject? It is not considered good form to hijack a thread started by someone else if you have an unrelated question. Quote
SLW210 Posted April 30, 2012 Posted April 30, 2012 jiji joseph, I moved this to a new thread. Please read the CODE POSTING GUIDELINES. Quote
David Bethel Posted April 30, 2012 Posted April 30, 2012 This looks familiar: http://www.cadtutor.net/forum/showthread.php?1390-How-to-use-the-LISP-routines-in-this-archive -David Quote
SLW210 Posted April 30, 2012 Posted April 30, 2012 Seems he read the CODE POSTING GUIDELINES already. Quote
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.