Message 1 of 17

Not applicable
12-20-2018
04:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Helpers,
Please help me out from my requirement by modifying below code with select similar for current viewable screen.
The below code is asking for window selection, instaed of current screen.
(defun c:SSW (/ filter ss1 ss2 ss3 add i e) ;; Select Similar within Window ;; Uses core SelectSimilar command ;; Alan J. Thompson, 2013.07.30 (setq filter (if (eq (getvar 'CVPORT) 1) (list (cons 410 (getvar 'CTAB))) '((410 . "Model")) ) ) (princ "\nSelect objects to select similar: ") (if (and (setq ss1 (ssget filter)) (progn (princ "\nSelect area to select similar object(s) within: ") (setq ss2 (ssget filter)) ) ) (progn (command "_.selectsimilar" ss1 "") (if (setq ss3 (ssget "_I" filter)) (progn (sssetfirst nil nil) (setq add (ssadd)) (repeat (setq i (sslength ss3)) (if (ssmemb (setq e (ssname ss3 (setq i (1- i)))) ss2) (setq add (ssadd e add)) ) ) (sssetfirst nil add) ) ) ) ) (princ) )
Solved! Go to Solution.