rcb007 Posted April 22, 2021 Share Posted April 22, 2021 (edited) I found a routine that can select similar multileaders that have the same attributed block values. I am having a hard time changing it from recognizing the block to just the mtext contents. It would be neat if it could do both (When selecting any help leader with an attribute or just the mtext). Thank you for the help. (defun c:Test ( / ent enx val ) (while (progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect mleader: "))) (/= 52 (getvar 'errno)) ) (cond ( (null ent) (princ "\nMissed, try again.") ) ( (/= "MULTILEADER" (cdr (assoc 0 (setq enx (entget ent))))) (princ "\nSelected object is not a multileader.") ) ; ( (/= acblockcontent (cdr (assoc 172 (reverse enx)))) ;;;;;<<<<<--------- Original Code ; (princ "\nSelected multileader does not contain an attributed block.") ; ) ( (/= acmtextcontent (cdr (assoc 172 (reverse enx)))) (princ "\nSelected multileader does not contain any values.") ) ( (null (setq val (vl-remove-if-not '(lambda ( x ) (and (= 302 (car x)) (wcmatch (cdr x) "~*[~0-9]*"))) (member '(301 . "}") enx)))) ;;;;;<<<<<--------- Not sure how to change this to look for the mtext values (princ "\nMultileader attributes do not contain integer values.") ;;;;;<<<<<--------- Not sure how to change this to look for the mtext values ) ( (null (sssetfirst nil (ssget "_A" (list '(0 . "MULTILEADER") (assoc 8 enx) (car val)))))) ) ) (princ) ) Edited April 22, 2021 by rcb007 Quote Link to comment Share on other sites More sharing options...
Shivam Sharma Posted January 14, 2022 Share Posted January 14, 2022 please help on this i also need this urgently 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.