hosyn Posted July 10, 2014 Share Posted July 10, 2014 I have this routine for filter block with select sample block : (defun c:fbn ( / blockname sset); filter all blocks of same name (setq blockname (cdr (assoc 2 (entget (car (entsel)))))) (setq sset (ssget (list (cons 2 blockname)))) (sssetfirst sset sset) (princ (strcat "\nSelected " (itoa (sslength sset)) " instances of block \"" blockname "\".")) (princ) ) ,and how can i select same filtering via the name of block for example the name of block "blockname1" can i exacted this lisp via this command: (c:fbn(blockname1)) Quote Link to comment Share on other sites More sharing options...
marko_ribar Posted July 10, 2014 Share Posted July 10, 2014 (defun fbn (blockname / sset) (setq sset (ssget (list (cons 2 blockname)))) (sssetfirst nil sset) (princ (strcat "\nSelected " (itoa (sslength sset)) " instances of block \"" blockname "\".")) (princ) ) ;;; Example : (fbn "blockname1") ;;; Quote Link to comment Share on other sites More sharing options...
hosyn Posted July 10, 2014 Author Share Posted July 10, 2014 (edited) THAXXXX GREEAAT Mr marko_ribar If i wanna explode selected block how do i do ??It's right to add :: (fbn "blockname1") (command "_explode") I add it but didn't do well? Edited July 10, 2014 by hosyn Quote Link to comment Share on other sites More sharing options...
7o7 Posted July 10, 2014 Share Posted July 10, 2014 (command "_explode" "L") can do. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 11, 2014 Share Posted July 11, 2014 (edited) 7o7 Last object may not be the block Hosyn like my other post to you explode using object (setq blockname (cdr (assoc 2 (entget (car (entsel)))))) ; now (setq obj (car (entsel))) (setq blockname (cdr (assoc 2 (entget obj)))) (command "explode" obj "") Edited July 12, 2014 by BIGAL explode not erase 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.