home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 15 / CD_ASCQ_15_070894.iso / vrac / may94cad.zip / TIP987.LSP < prev   
Lisp/Scheme  |  1994-04-25  |  642b  |  24 lines

  1. ; TIP987.LSP: SWAP.LSP   Swap Two Groups of Objects   (c)1994, Hugh J. Williams
  2.  
  3. ; ***************************************************
  4. ;
  5. ;   SWAP.LSP
  6. ;   Author: Hugh J. Williams, Computer Science Corp.
  7. ;
  8. ;   program to allow Acad objects to trade places..
  9. ;
  10.  
  11. (defun C:SWAP (/ SS2 PT1 PT2)
  12.   (setvar "cmdecho" 0)
  13.   (princ "\nFirst swap-set ")
  14.   (setq P (ssget))
  15.   (princ "\nSecond swap-set ")
  16.   (setq SS2 (ssget)
  17.         PT1 (getpoint "Base point of displacement: ")
  18.         PT2 (getpoint PT1 "Second point of displacement: "))
  19.   (command ".move" P "" PT1 PT2
  20.            ".move" SS2 "" PT2 PT1
  21.            ".redraw")
  22. )
  23.  
  24.