amcdicsac Posted March 16, 2017 Posted March 16, 2017 Hi. I wanted to know if there is any lisp that selects annotative blocks Thank you Quote
samifox Posted March 16, 2017 Posted March 16, 2017 why lisp? you can use Qselect > Block >Annotative Quote
BIGAL Posted March 17, 2017 Posted March 17, 2017 Have you tried doing a Dump of a annotative block and seeing what properties are revealed. Quote
thanhdattdk Posted March 17, 2017 Posted March 17, 2017 (edited) (prompt"\n[cmd : SI] - TDK - P.TKCD - CIENCO625") (defun c:SG (/ sset ssl) (setq sset (ssget (list '(0 . "ATTDEF") )) ssl (sslength sset) ) (princ (strcat (itoa ssl) " INSERT(s) found !")) (command "_.PSELECT" "p" "") (princ) ) (prompt"\n[cmd : SI] - TDK - P.TKCD - CIENCO625") (defun c:SG1 (/ sset ssl) (setq sset (ssget (list '(0 . "ATTRIB") )) ssl (sslength sset) ) (princ (strcat (itoa ssl) " INSERT(s) found !")) (command "_.PSELECT" "p" "") (princ) ) Edited March 21, 2017 by SLW210 Added Code Tags Quote
amcdicsac Posted March 17, 2017 Author Posted March 17, 2017 Yes, as a result I have the following _$ "*A2" _$ ((((-1 . <Entity name: -387e2b0>) (0 . "DICTIONARY") (5 . "2D2") (102 . "{ACAD_REACTORS") (330 . <Entity name: -387e2b8>) (102 . "}") (330 . <Entity name: -387e2b8>) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "*A2") (350 . <Entity name: -387e2a0>) ) ) (((-1 . <Entity name: -387e3f8>) (0 . "DICTIONARY") (5 . "2A9") (102 . "{ACAD_REACTORS") (330 . <Entity name: -387e400>) (102 . "}") (330 . <Entity name: -387e400>) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "*A2") (350 . <Entity name: -387e3e8>) ) ) (((-1 . <Entity name: -387e580>) (0 . "DICTIONARY") (5 . "280") (102 . "{ACAD_REACTORS") (330 . <Entity name: -387e588>) (102 . "}") (330 . <Entity name: -387e588>) (100 . "AcDbDictionary") (280 . 0) (281 . 1) (3 . "*A2") (350 . <Entity name: -387e570>) ) ) ) _$ This lisp I use (defun c:pos (/ ss i ssent objss) (setq ss (LM:ss->ent (ssget (list (cons 0 "INSERT"))))) ) ;;;---------------------------------------------------------- (defun LM:ss->ent ( ss / i l ) (if ss (repeat (setq i (sslength ss)) (setq l (cons (IsAnnotative (ssname ss (setq i (1- i)))) l)) ) ) ) ;;; Argument: an ename or vla-object. ;;; Return T if object is annotative, otherwise nil. ;;;Joe Burke (defun IsAnnotative (e) (and e (setq e (cdr (assoc 360 (entget e)))) (setq e (dictsearch e "AcDbContextDataManager")) (setq e (dictsearch (cdr (assoc -1 e)) "ACDB_ANNOTATIONSCALES")) (assoc 350 e) ) (list e) ;; adicione este fragmento ) Quote
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.