home *** CD-ROM | disk | FTP | other *** search
- ;*******TY\HARRAY.LSP****** 10-17-89
- (if (null ls1) (setq ls1 "ls1"))
- ;----------
- (defun C:HARRAY ( )
- (if (listp ls1) (princ ls1) (mls1))
- (setq wcy 1)
- (while wcy
- (setq wxr (getint "\n 1.Mls1/2.Vcopy/3.Hcopy<or RETURN for none>:"))
- (if (null wxr) (setq wcy nil))
- (if (= wxr 1) (mls1))
- (if (= wxr 2) (vcopy))
- (if (= wxr 3) (hcopy))
- )
- )
- (defun mls1 ( )
- (setq wxr 1 ls1 (list "ls1"))
- (if (or (= mmm "m") (= mmm "M")) (prompt "!mmm=m,"))
- (while wxr
- (setq ll (getreal "\n enter ll <or RETURN for continue>:"))
- (if (null ll) (setq wxr nil) (setq ls1 (cons ll ls1)))
- )
- (setq ls1 (reverse ls1))
- )
- ;----------
- (defun vcopy ( )
- (setq ppp (ssget))
- (setq wxr 1 adl 0.0 n 1)
- (setq af (getangle "\n enter angle <0>:"))
- (if (null af) (setq af 0)) (setq ra (* (/ af pi) 180.0))
- (while wxr
- (setq dl (nth n ls1))
- (if (= dl nil) (setq wxr nil) (progn
- (setq adl (+ adl dl))
- (command "copy" ppp "" '(0 0) (polar '(0 0) af adl))
- (setq n (1+ n)))
- )
- )
- )
- ;----------
- (defun hcopy ( )
- (setq ppp (ssget))
- (setq wxr 1 adl 0.0 n 1)
- (while wxr
- (setq dl (nth n ls1))
- (if (= dl nil) (setq wxr nil) (progn
- (setq adl (+ adl dl))
- (command "copy" ppp "" '(0.0 0 0) (list 0 0 adl))
- (setq n (1+ n)))
- )
- )
- )
- (princ)