Search the Community
Showing results for tags 'table cells'.
-
Hello guys, I'm here again asking for help to this routine. I want to copy the text in the leader and paste it on the table cells in this manner (See photos): 1. pick leader with text 2. select cell 1 to paste the first line of text with. 3. select cell 2 to paste the second line of text with. 4. select cell 3 to paste the third line of text with. and so on and so forth. I have this code in mleader, i dont know if it will help. This leader comes from combination of block attributes and dimension entities. (defun gav ( blk tag / val enx ) (while (and (null val) (setq blk (entnext blk)) (= "ATTRIB" (cdr (assoc 0 (setq enx (entget blk))))) ) (if (= (strcase tag) (strcase (cdr (assoc 2 enx)))) (setq val (cdr (assoc 1 (reverse enx)))) ) ) ) (defun c:pp() (setq obj (car(entsel "\nSelect Object: "))) (setq dim1(entget (car(entsel "\nSelect Dimension: ")))) (setq dimval1(cdr (assoc 42 dim1))) (setq d (strcat (rtos dimval1 2 2))) (setq dim2(entget (car(entsel "\nSelect Dimension: ")))) (setq dimval2(cdr (assoc 42 dim2))) (setq e (strcat (rtos dimval2 2 2))) (setq c (gav obj "LWI-0000")) (setq b (gav obj "CL")) (setq a (cdr(assoc 2 (entget obj)))) (setq txt (strcat a "\n" b "\n" c "\n" d "\n" e)) (setvar "cmleaderstyle" "PP") (command "_mleader" pause pause txt "") ) BTW. I used the getattributevalue for block entities created by @Lee Mac. Thanks to this. It really helped me a lot. Thanks in advance. PS: Please do it as simple as my code. Im new learning this lisp thing. Thanks ^^. hehe
- 3 replies
-
- lisp
- table cells
-
(and 1 more)
Tagged with: