- (defun c:tt()
- (setq ss (ssget '((0 . "LWPOLYLINE"))))
- (if ss
- (foreach e1 (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
- (setq e (entget e1)
- h (reverse (member (assoc 39 e) (reverse e)))
- l (LM:LWVertices e)
- z (assoc 210 e)
- i -1 lst nil)
- (foreach a l (if (= 0 (rem (setq i (1+ i)) 4)) (setq lst (cons a lst))))
- (entmod (append h(apply 'append (reverse lst))(list z)))
- ))
- (princ)
- )
- ;; LW Vertices - Lee Mac
- ;; Returns a list of lists in which each sublist describes
- ;; the position, starting width, ending width and bulge of the
- ;; vertex of a supplied LWPolyline
- (defun LM:LWVertices ( e )
- (if (setq e (member (assoc 10 e) e))
- (cons
- (list
- (assoc 10 e)
- (assoc 40 e)
- (assoc 41 e)
- (assoc 42 e)
- )
- (LM:LWVertices (cdr e))
- )))
- (vl-load-com) (princ)
|