(if (wcmatch (cdr (assoc 0 (entget entb))) "ACAD_TABLE,*DIMENSION,*LEADER")(setq enta entb)) (if (and (/= entb nil) (/= (type entb) 'real) ) (setq pt (cdr (assoc 10 (entget enta))) ) (princ "I thank you, that is selected OK: ") (if (not (wcmatch (cdr (assoc 0 (entget (car result)))) "TEXT,MTEXT,ATTRIB") ) ((= 'list (type result)) do stuff with ENT (setq result (nentselp "\nSelect Text: ")) (defun gettext ( / endloop enta entb pt result LP) (list (cons acount (cdr (assoc 1 (entget Mytext))) )) (defun c:txtmg ( / MyTexts EndLoop MyText acount) Just need to know about the blocksĮDIT 2: Added dotted pair list for output, just as an idea for copying / pasting many many texts (either use a foreach loop or an assoc search. The rest of what you want should all be copy and paste from somewhere, just need to know how to do pasting to attributesĪnd a bit long winded way to do it, copy and paste, will select texts (up to something like 255 characters long) until you hit enter or space. To paste to a block how is the LISP to know which text to paste to which attribute? I tend to select each text in a block one after another to update, but to do it with one click you'll maybe need to specify the attribute tag names Then all you need to do is make a loop to select the texts one after another, and paste them into the block. (princ (cdr (assoc 1 (entget (car (nentselp "Select text: ")))))) ) Try this in a LISP or paste into the command line as an example: To select xref text, you will want to use nentselp instead of entsel to select the text objects - I am not sure of your ability and if this makes sense ?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |