plecs Posted March 24, 2014 Author Posted March 24, 2014 How to manipulate this list I want to be different not insert point '(0 0 0) I want to be (Setq ipt (getpoint "\ n Pick lower corner:")) (entmake (list (cons 0 "ATTDEF") (cons 8 "0") [color=red](cons 10 '(0 0 0)) (cons 11 '(0 0 0))[/color] (cons 40 1) (cons 1 (rtos a4 2)) (cons 3 "Length1") (cons 2 "Length") (cons 70 0) (cons 73 0) (cons 50 0) (cons 41 1) (cons 51 0) (cons 7 "STANDARD") (cons 71 0) (cons 72 0) (cons 210 (list 0 0 1)) (cons 74 0) (cons 62 256) (cons 39 0) (cons 6 "BYLAYER")))[/code Quote
Tharwat Posted March 25, 2014 Posted March 25, 2014 Is this what you mean ? (if (and (setq a4 123.456) (setq ipt (getpoint "\ n Pick lower corner:")) ) (entmake (list (cons 0 "ATTDEF") (cons 8 "0") (cons 10 ipt) (cons 11 ipt) (cons 40 1) (cons 1 (rtos a4 2)) (cons 2 "Length") (cons 3 "Length1") (cons 70 0) (cons 73 0) (cons 50 0) (cons 41 1) (cons 51 0) (cons 7 "STANDARD") (cons 71 0) (cons 72 0) (cons 74 0) (cons 62 256) (cons 6 "BYLAYER") ) ) ) Quote
plecs Posted March 26, 2014 Author Posted March 26, 2014 in this situation writh in command line; error: bad DXF grou (10 (1104.24 668.41 0.0)) (defun c:a112 () ;imput (setq a1 (getpoint "\ n Pick lower corner:")) (setq a2 (getreal "\n Width of the cabinet:")) (setq a3 (getreal "\n Depth of the outside dimension cabinet:")) (setq a4 (getreal "\n Hight of the cabinet:")) (setq grp (getreal "\nMaterialthickness of the cabinet:")) (setq grpfl (getreal "\n Thickness back :")) (command "_.box" "_non" a1 "L" grp a4 a3) ;************************************************************************ (setq fe (entlast)) (setq bc 1 bn "Rightside1") (while (tblsearch "BLOCK" bn) (setq bc (1+ bc) bn (strcat "Rightside" (itoa bc)))) (entmake (list (cons 0 "BLOCK")[color="red"](list 10 a1)[/color](cons 2 bn)(cons 70 2))) (entmake (entget fe)) (entmake (list (cons 0 "ATTDEF") (cons 8 "0") [color="red"](cons 10 a1)[/color] [color="red"](cons 11 a1)[/color] (cons 40 1) (cons 1 (rtos a4 2)) (cons 3 "Length1") (cons 2 "Length") (cons 70 0) (cons 73 0) (cons 50 0) (cons 41 1) (cons 51 0) (cons 7 "STANDARD") (cons 71 0) (cons 72 0) (cons 210 (list 0 0 1)) (cons 74 0) (cons 62 256) (cons 39 0) (cons 6 "BYLAYER"))) (entmake (list (cons 0 "ENDBLK")(cons 8 "0"))) (entdel fe) (entmake (list (cons 0 "INSERT")(cons 2 bn)[color="red"](cons 10 a1)[/color](cons 66 1) (cons 62 256) (cons 39 0) (cons 6 "BYLAYER"))) (entmake (list (cons 0 "ATTRIB") (cons 8 "0") [color="red"](cons 10 a1)[/color] [color="red"](cons 11 a1)[/color] (cons 40 1) (cons 1 (rtos a4 2)) (cons 2 "Length") (cons 70 0) (cons 73 0) (cons 50 0) (cons 41 1) (cons 51 0) (cons 7 "STANDARD") (cons 71 0) (cons 72 0) (cons 210 (list 0 0 1)) (cons 73 0) (cons 62 256) (cons 39 0) (cons 6 "BYLAYER"))) (entmake (list (cons 0 "SEQEND")(cons 8 "0")) ) ;End Command (setq a6 (car a1)) (setq a7 (cadr a1)) (setq a8 (caddr a1)) (progn (setq a9 (+ a6 (- a2 grp)))) (setq a21 (list a9 a7 a8)) (progn (setq a10 (+ a6 grp)) (setq a13 (- a2 (* grp 2))) (setq a31 (list a10 a7 a8))) (progn (setq a11 (+ a7 (- a4 grp)))) (setq a41 (list a10 a11 a8)) (progn (setq a14 (- a2 grp)) (setq a15 (- a4 grp)) (setq a16 (+ a6 (/ grp 2))) (setq a17 (+ a7 (/ grp 2)))) (setq a51 (list a16 a17 a8)) (command "_.box" "_non" a21 "L" grp a4 a3) (command "_.box" "_non" a31 "L" a13 grp a3) (command "_.box" "_non" a41 "L" a13 grp a3) (command "_.box" "_non" a51 "L" a14 a15 grpfl) (princ) ) 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.