Jump to content

Recommended Posts

Posted

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

  • Replies 23
  • Created
  • Last Reply

Top Posters In This Topic

  • plecs

    15

  • Tharwat

    7

  • ReMark

    1

  • steven-g

    1

Posted

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")
          )
 )
)

Posted

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)
 )

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...