Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: I need to draw a box laid out flat for user defined length x width x depth

  1. #1
    Member
    Join Date
    2004-10
    Location
    austin, texas
    Posts
    34
    Login to Give a bone
    0

    Default I need to draw a box laid out flat for user defined length x width x depth

    i need to draw a box laid out flat for user defined length x width x depth.....

    I'm attaching a DXF file that explains in more detail...

    i haven't found anyone who can do it.....so if you can your bad a*s


    please reply back if you cant open or don't receive the DXF attachment
    Attached Files Attached Files
    Last edited by ricodominguez; 2006-06-13 at 01:47 PM. Reason: update attachment

  2. #2
    Active Member
    Join Date
    2003-11
    Location
    YUL
    Posts
    75
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    Quote Originally Posted by ricodominguez
    i need to draw a box laid out flat for user defined length x width x depth.....

    I'm attaching a DXF file that explains in more detail...

    i haven't found anyone who can do it.....so if you can your bad a*s


    please reply back if you cant open or don't receive the DXF attachment
    No attachment that I can see.

  3. #3
    Member
    Join Date
    2004-10
    Location
    austin, texas
    Posts
    34
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    i attched the drawing file again. for some reason it didn't let me attach a dxf

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    Looks pretty simple unless there is something I am missing.

    Do you want the dimensions also, or just the entities on layer 1 and 2?
    R.K. McSwain | CAD Panacea |

  5. #5
    All AUGI, all the time
    Join Date
    2015-12
    Location
    Central Oregon
    Posts
    591
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    There is a dimension labelled as : W + 0.125/2 + 0.0078125 which does not add up to the actual dimension of 9.4375

  6. #6
    Member
    Join Date
    2004-10
    Location
    austin, texas
    Posts
    34
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    sorry your right it should be w/2 + 0.125

    i updated the dwg file

  7. #7
    All AUGI, all the time
    Join Date
    2015-12
    Location
    Central Oregon
    Posts
    591
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    Rico,
    The dimensions do not match the actual geometry that was drawn. If you provide it redrawn to accurately reflect what is wanted, it really isn't that hard to write the lisp. I just don't want to do it more than once.....

    Jeff

  8. #8
    Member
    Join Date
    2004-10
    Location
    austin, texas
    Posts
    34
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    miff...
    i updated the attachment with the correct info.

  9. #9
    All AUGI, all the time
    Join Date
    2015-12
    Location
    Central Oregon
    Posts
    591
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    Here ya go, Rico.....
    Code:
    ;;;by Jeff Mishler Jun 13, 2006
    (defun c:flatbox ( / coords d270 d90 doc hgt l lay1 lay2 len p1
    		  p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p2 p20
    		  p21 p22 p23 p24 p25 p26 p27 p28 p29 p3 p30 p31
    		  p32 p33 p34 p35 p36 p37 p38 p39 p4 p40 p41 p5
    		  p6 p7 p8 p9 pline space stpt wid x)
      (vl-load-com)
      (if (and (setq len (getdist "\nBox length: "))
    	   (setq wid (getdist "\nBox width: "))
    	   (setq hgt (getdist "\nBox height: "))
    	   (setq stpt (getpoint "\nLower left corner of box: "))
    	   )
        (progn
          (setq d90 (* pi 0.5)
    	    d270 (* pi 1.5)
    	    doc (vla-get-activedocument (vlax-get-acad-object))
    	    lay1 (vla-add (vla-get-layers doc) "1")
    	    lay2 (vla-add (vla-get-layers doc) "2")
    	    )
          (vl-catch-all-apply '(lambda ()
    			     (vla-load (vla-get-linetypes doc) "DASHED" "acad.lin")
    			     ))
          (vla-put-color lay1 6)
          (vla-put-color lay2 3)
          (setq p1 (polar stpt 0 len)
    	    p2 (polar p1 d90 (+ (/ wid 2.0) 0.125))
    	    p34 (polar p2 0 0.125)
    	    p3 (polar p2 0 0.25)
    	    p4 (polar p3 d270 (+ (/ wid 2.0) 0.125))
    	    p5 (polar p4 0 (- wid 0.0625))
    	    p6 (polar p5 d90 (+ (/ wid 2.0) 0.125))
    	    p35 (polar p6 0 0.125)
    	    p7 (polar p6 0 0.25)
    	    p8 (polar p7 d270 (+ (/ wid 2.0) 0.125))
    	    p9 (polar p8 0 (- len 0.0625))
    	    p10 (polar p9 d90 (+ (/ wid 2.0) 0.125))
    	    p36 (polar p10 0 0.125)
    	    p11 (polar p10 0 0.25)
    	    p12 (polar p11 d270 (+ (/ wid 2.0) 0.125))
    	    p13 (polar p12 0 (- wid 0.125))
    	    p14 (polar p13 d90 (+ (/ wid 2.0) 0.125))
    	    p37 (polar p14 0 0.125)
    	    p15 (polar p37 (angtof "15.0" 0) 1.8117)
    	    p38 (polar p37 d90 (+ hgt 0.375))
    	    p17 (polar p38 pi 0.125)
    	    p16 (polar p38 (angtof "345.0" 0) 1.8117)
    	    p20 (polar p11 d90 (+ hgt 0.375))
    	    p21 (polar p10 d90 (+ hgt 0.375))
    	    p24 (polar p7 d90 (+ hgt 0.375))
    	    p25 (polar p6 d90 (+ hgt 0.375))
    	    p28 (polar p3 d90 (+ hgt 0.375))
    	    p29 (polar p2 d90 (+ hgt 0.375))
    	    p33 (polar stpt d90 (+ (/ wid 2.0) 0.125))
    	    p32 (polar p33 d90 (+ hgt 0.375))
    	    p31 (polar p32 d90 (+ (/ wid 2.0) 0.125))
    	    p30 (polar p29 d90 (+ (/ wid 2.0) 0.125))
    	    p27 (polar p28 d90 (+ (/ wid 2.0) 0.125))
    	    p26 (polar p25 d90 (+ (/ wid 2.0) 0.125))
    	    p23 (polar p24 d90 (+ (/ wid 2.0) 0.125))
    	    p22 (polar p21 d90 (+ (/ wid 2.0) 0.125))
    	    p19 (polar p20 d90 (+ (/ wid 2.0) 0.125))
    	    p18 (polar p17 d90 (+ (/ wid 2.0) 0.125))
    	    p39 (polar p36 d90 (+ hgt 0.375))
    	    p40 (polar p35 d90 (+ hgt 0.375))
    	    p41 (polar p34 d90 (+ hgt 0.375))
    	    )
          (setq coords (apply 'append (mapcar '(lambda (x)
    					     (list (car x) (cadr x))
    					     )
    					  (list stpt p1 p2 p3 p4 p5 p6 p7 p8 p9
    						p10 p11 p12 p13 p14 p37 p15 p16 
    						p38 p17 p18 p19 p20 p21 p22 p23 p24 p25
    						p26 p27 p28 p29 p30 p31 p32 p33 stpt)
    					  )))
          (setq space (if (eq (getvar "cvport") 1)
    		    (vla-get-paperspace doc)
    		    (vla-get-modelspace doc)
    		    ))
          (setq pline (vlax-invoke space 'addlightweightpolyline coords))
          (vla-put-layer pline "1")
          (vla-explode pline)
          (vla-delete pline)
          (mapcar '(lambda (x / l)
    		 (setq l (vlax-invoke space 'addline (car x) (cadr x)))
    		 (vla-put-layer l "2")
    		 (vla-put-linetype l "DASHED")
    		 )
    	      (list (list p33 p2)
    		    (list p3 p6)
    		    (list p7 p10)
    		    (list p11 p14)
    		    (list p37 p38)
    		    (list p17 p20)
    		    (list p21 p24)
    		    (list p25 p28)
    		    (list p29 p32)
    		    (list p34 p41)
    		    (list p35 p40)
    		    (list p36 p39)
    		    ))
          )
        )
      (princ)
      )
    Jeff

  10. #10
    Member
    Join Date
    2004-10
    Location
    austin, texas
    Posts
    34
    Login to Give a bone
    0

    Default Re: I need to draw a box laid out flat for user defined length x width x depth

    Originally Posted by ricodominguez
    thaks for writing that file for me it works great....i'm trying to learn as much as i can about lisp writing. can you suggest any books or web sites..

    thanks again for your help

    rico

Page 1 of 2 12 LastLast

Similar Threads

  1. Walls defined as families with user defined parameters
    By J-G in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2021-04-01, 12:53 PM
  2. Replies: 3
    Last Post: 2015-01-23, 12:29 AM
  3. Replies: 10
    Last Post: 2006-06-14, 03:07 AM
  4. room tag with width and depth
    By Bim Man in forum Revit Architecture - General
    Replies: 2
    Last Post: 2004-12-18, 12:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •