Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Please help, I cant figure out how to write this piece of code. The user will select a set from multiple layers. Layer "00formline" contains lines that I need to create a new polyline out of and then remove the "00formline" objects from the initial selection set and add the new polyline to the initial selection set.
(setq form_ss (ssget '((8 . "00-FORM,00-RE-FORM,SHOT,00FORMLINE"))))
(cond
((and form_ss)
(setq sel_ss (ssadd) i -1)
(while (< (setq i (1+ i)) (sslength form_ss)
(setq e (ssname form_ss i) lname (cdr (assoc 8 (entget e))))
(cond
((wcmatch lname "OOFORMLINE*")
(setq sel_ss (ssadd (ssname form_ss i) sel_ssl))))
)
)
)
(setq sel_ss (ssadd (ssname form_ss i) sel_ss))
(setq form_ss (ssdel (ssname form_ss i) form_ss))
)
Solved! Go to Solution.