Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
I thought I had solved my problem with the method you instructed me to use last time, but a new problem has arisen.
Line 36 of the following code solved the problem successfully.
Is there any way to then extrude the selection set and batch select again?
Thank you.
(defun c:test ( / pt1 pt2 ss nn id ent ob lid)
(setq pt1 (getpoint "\nSelect point"))
(setq pt2 (getcorner pt1 "\nAnother corner"))
(setq ss (ssget "_C" pt1 pt2(list (cons 0 "LWPOLYLINE"))))
(setq nn (sslength ss))
(setq i 0)
(repeat nn
(setq id (ssname ss i))
(push id)
(setq i (1+ i))
)
)
(defun push ( id / th pts panel ss nn i iid shape)
(setq th 5)
(setq pts (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget id)))
(setq pts (mapcar 'cdr pts))
(command "copy" id "" '(0 0 0) '(0 0 0))
(command "extrude" (entlast) "" 5)
(setq panel (entlast))
(setq ss (ssget "WP" pts))
(setq nn (sslength ss))
(setq i 0)
(repeat nn
(setq iid (ssname ss i))
(setq shape (cdr (assoc 0 (entget iid))))
(cond
((= shape "INSERT")
(command "copy" iid "" '(0 0 0) '(0 0 0))
(command "explode" iid)
(setq iid (ssget "_P"))
(command "extrude" iid "" th)
;(setq iid (entlast))
(setq iid (ssget "_p"));----------- Here iid is nil
(command "subtract" panel "" iid "")
)
(T
(command "copy" iid "" '(0 0 0) '(0 0 0))
(command "extrude" (entlast) "" th)
(command "subtract" panel "" (entlast) "")
)
)
(setq i (1+ i))
)
)
Saitoib
Solved! Go to Solution.