- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So I have been modifying an existing auto lisp that is meant to delete all revclouds in a drawing. However, it so happens to be the parameters set up in the lisp also select part of a logo in the title block. My work around was to add a "<NOT" "NOT>" logical operator into the ssget function. I tried Group code 10 to exclude the exact object based on the info pulled from the dxf data, but for some reason it still selects the polyline. The Code is below. It runs and loads fine, but it runs as if the "NOT" logical operator isnt even there.
(defun c:REVCSEL (/ s e i a p)
(if (setq s (ssget "_X" '((0 . "LWPOLYLINE") (410 . "Model") (-4 . "/=") (42 . 0) (-4 . ">") (90 . 4) (-4 . "<NOT") (10 -516.149 553.471) (-4 . "NOT>"))))
(repeat (setq i (sslength s))
(setq e (ssname s (setq i (1- i)))
a (length (vl-remove-if-not '(lambda (u) (and (eq (car u) 42) (not (eq (cdr u) 0)))) (entget e)))
p (length (vl-remove-if-not '(lambda (u) (eq (car u) 10)) (entget e)))
)
(if (not (or (eq a p) (eq (1+ a) p)))
(ssdel e s)
)
)
)
(sssetfirst nil s)
(princ)
)
Solved! Go to Solution.