bagulhodoido Posted January 21, 2009 Posted January 21, 2009 -------- TLEN (the original) -------- (defun C:TLEN (/ ss tl n ent itm obj l) (setq ss (ssget) tl 0 n (1- (sslength ss))) (while (>= n 0) (setq ent (entget (setq itm (ssname ss n))) obj (cdr (assoc 0 ent)) l (cond ((= obj "LINE") (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent)))) ((= obj "ARC") (* (cdr (assoc 40 ent)) (if (minusp (setq l (- (cdr (assoc 51 ent)) (cdr (assoc 50 ent))))) (+ pi pi l) l))) ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE") (= obj "LWPOLYLINE")(= obj "ELLIPSE")) (command "_.area" "_o" itm) (getvar "perimeter")) (T 0)) tl (+ tl l) n (1- n))) (alert (strcat "Total length of selected objects is " (rtos tl))) (princ) ) So, I use this command (TLEN) alot, for quantitatives the most. I was wondering if there is somehow a way to check if every line selected got the same coordinates as another one, what would mean there are overlapped lines in the selection. That would avoid wrong quantitatives due to lines drawn by mistake. A more complete version of my request would be to check not only for lines with exactly the same coordinates but also lines that could be shorter than the one in front of it, which would make them with possible different starting and ending coordinates but still overlapped. The alogorythm on my opinion would circle around checking on situations where the coordinates doesn't change on the X or Y axis on straight lines and maybe proportional coordinates variations for the angled ones. Thanks in advance for any help 8D Quote
MaxwellEdison Posted January 21, 2009 Posted January 21, 2009 That's seriously a command? It must be an express tool as there's no help file...whats its function (conjunction junction...). Also...the Colin Hay song is now embedded in my brain... Quote
lpseifert Posted January 21, 2009 Posted January 21, 2009 From Help for Express tools OVERKILL Removes unneeded objects by deleting duplicates and combining line and arc segments that overlap. Command: OVERKILL Select objects: Use a selection method to select annotation objects OVERKILL removes objects whose geometry is redundant. For example: Duplicate copies of objects are deleted An arc drawn directly over a portion of a circle so that the arc cannot be seen is deleted. Two lines drawn at the same angle so that they partially overlap are combined to form a single line. Duplicate line and/or arc segments within polylines are removed. Quote
bagulhodoido Posted January 21, 2009 Author Posted January 21, 2009 That will do! thank you x)! 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.