Results 1 to 4 of 4

Thread: command for box with automatic cross lines

  1. #1
    Member
    Join Date
    2010-07
    Posts
    15
    Login to Give a bone
    0

    Default command for box with automatic cross lines

    Hello, i was wondering if anyone knows if there's a command out there, or lisp routine, or anything else that draws a rectangle and automatically draws cross lines from corner to corner. I draw a lot of these and it would be great if such a thing existed. Any feedback is welcome. Thanks

  2. #2
    Certifiable AUGI Addict tedg's Avatar
    Join Date
    2005-06
    Location
    in the upper right corner
    Posts
    3,508
    Login to Give a bone
    0

    Default Re: command for box with automatic cross lines

    Quote Originally Posted by double_u_d View Post
    Hello, i was wondering if anyone knows if there's a command out there, or lisp routine, or anything else that draws a rectangle and automatically draws cross lines from corner to corner. I draw a lot of these and it would be great if such a thing existed. Any feedback is welcome. Thanks
    Quick one, you can change the command etc.
    This is just basic, taken from a post here in AUGI, can't rembember when
    Code:
    (defun c:box-cross (/ Point1 Point2 Point3 Point4)
      (setq Point1 (getpoint "\nPick first corner of rectangle: ")
     )
      (setq Point2 (getpoint "\nPick second corner of rectangle: ")
     )
      (setq Point3 (list (nth 0 Point1) (nth 1 Point2)
           )
     )
      (setq Point4 (list (nth 0 Point2) (nth 1 Point1)
           )
     )
      (command "._rectang" Point1 Point2 "._line" Point1 Point2 "" "._line" Point3 Point4 "")
    )

  3. #3
    Member
    Join Date
    2010-07
    Posts
    15
    Login to Give a bone
    0

    Default Re: command for box with automatic cross lines

    Great, thanks, i'll give that a shot.

  4. #4
    Super Moderator dkoch's Avatar
    Join Date
    2003-03
    Location
    Philadelphia, PA
    Posts
    2,392
    Login to Give a bone
    0

    Default Re: command for box with automatic cross lines

    Quote Originally Posted by tedg View Post
    Quick one, you can change the command etc.
    This is just basic, taken from a post here in AUGI, can't rembember when
    Code:
    (defun c:box-cross (/ Point1 Point2 Point3 Point4)
      (setq Point1 (getpoint "\nPick first corner of rectangle: ")
     )
      (setq Point2 (getpoint "\nPick second corner of rectangle: ")
     )
      (setq Point3 (list (nth 0 Point1) (nth 1 Point2)
           )
     )
      (setq Point4 (list (nth 0 Point2) (nth 1 Point1)
           )
     )
      (command "._rectang" Point1 Point2 "._line" Point1 Point2 "" "._line" Point3 Point4 "")
    )
    If you replace the second getpoint with getcorner Point1, you will get rectangular rubber band lines extending from the first point chosen, just like the RECTANG command.
    Code:
     (setq Point2 (getcorner Point1 "\nPick second corner of rectangle: ")

Similar Threads

  1. automatic multiple command when creating a fillet like copy command
    By Wish List System in forum AutoCAD Wish List
    Replies: 3
    Last Post: 2012-01-18, 06:25 PM
  2. Breaking multiple lines using a cross- line
    By perro_flyhigh in forum AutoCAD General
    Replies: 1
    Last Post: 2010-10-07, 09:40 AM
  3. Cross section and property lines
    By Don Sutherland in forum Revit Architecture - General
    Replies: 2
    Last Post: 2007-07-19, 05:26 PM
  4. 3D Cylinder - remove cross-lines from display
    By jekstein in forum AutoCAD 3D (2006 or below)
    Replies: 3
    Last Post: 2006-03-11, 04:01 PM

Posting Permissions

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