home *** CD-ROM | disk | FTP | other *** search
/ Share Gallery 1 / share_gal_1.zip / share_gal_1 / GR / GR505.ZIP / LSP.EXE / RECT.LSP < prev    next >
Text File  |  1987-07-12  |  1KB  |  28 lines

  1. (DEFUN c:rect ()
  2.    ;
  3.    ; Mike Pillers, P.E.     July 12, 1987
  4.    ; Machine/ Mechanism Design Consultant
  5.    ; MJP Mechanical Engineering & CAD Service
  6.    ; San Jose, CA          (408) 280-7959
  7.    ;
  8.    ; This command will allow the user to draw a simple rectangle
  9.    ; while being able to watch it "rubber band" on the screen.
  10.    ; Since the resulting rectangle is a PLINE, the user will
  11.    ; be able to STRETCH, BREAK, & EXPLODE it.  This is much more
  12.    ; convenient than than using the RECTANG block that comes 
  13.    ; with AutoCAD that can't even be exploded.
  14.    ;
  15.    ;                     AutoCAD version 2.6 is required.
  16.    ;
  17.   (setq p1 (getpoint "\nEnter first point: "))
  18.   (setq p3 (getcorner p1 "\nEnter second point: "))
  19.   (setq x1 (car p1))
  20.   (setq x2 (car p3))
  21.   (setq y1 (cadr p1))
  22.   (setq y2 (cadr p3))
  23.   (setq p2 (list x1 y2))
  24.   (setq p4 (list x2 y1))
  25.   (command "pline" p1 p2 p3 p4 "c")
  26. )
  27.   
  28.