hosyn Posted July 22, 2014 Share Posted July 22, 2014 Is there a way with touch a block select automatically similar block in selected reign of drawing via lisp code or command similar select? Quote Link to comment Share on other sites More sharing options...
pBe Posted July 22, 2014 Share Posted July 22, 2014 Have you tried SSX ? Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted July 22, 2014 Share Posted July 22, 2014 hi hosyn, i'm not sure your meaning of touching, Try this simple dxf filter function, (issget e i); argument e=reference entity & i=dxf index to be filtered ;Single dxf index-match ssget filter (defun issget (_e _id / ss i e1 e2 lst ss1 next) (if (not (setq ss (ssget))) (setq ss(ssget "X"))) (if ss (progn (setq i 0) (repeat (sslength ss) (setq e1 (ssname ss i)) (if (apply 'equal (foreach en (list e1 _e ) (setq lst (cons (mapcar '(lambda (x) (cdr (assoc x (entget en)))) (list 0 _id)) lst)) ;setq ) ;foreach ) ;apply (setq ss1 (cons e1 ss1)) ) ;if (setq i (1+ i) lst nil)) ;repeat (setq next (ssadd)) (foreach e2 ss1 (ssadd e2 next)) ;foreach ) ;progn nil) ;if ) ; defun Example: Just pick a single entity, then [ENTER] ,or manually select _$ (sslength (issget (car(entsel)) 8 )) ; 44 ; Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 23, 2014 Share Posted July 23, 2014 Simple (setq obj (entsel "pick block")) (setq bname (assoc 2 (entget (car obj))) (princ bname) ; just use bname in a ssget filter now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.