Talk about an odd coincidence.
We recently made the switch over from AutoCAD R14.0 to ADT 2004. In the move we lost alot of commands and shortcut keys.
I had multiple requests from users here for the creation of two commands to replace the missing ones. The two commands were 'Continuous Copy' & 'Draw by Example'. I created continuous copy with a more basic version I found on the internet as a start and help from a friend to work out the bugs. Here is the resulting code:
code:
(defun C:CC (/ A INPUTDIST INPUTANG G-PR G-PR2 G-QTY G-INPUT)
(princ "\nSelect entities to Continuous Copy: ")
(if (setq A (ssget))
(progn (if (not DEFAULTANG)
(setq DEFAULTANG 0.0)
)
(if (setq INPUTANG (getangle (strcat "\nAngle to copy :")))
(setq DEFAULTANG INPUTANG)
(setq INPUTANG DEFAULTANG)
)
(if (setq INPUTDIST (getdist (if DEFAULTDIST
(strcat "\nDistance to copy :")
"\nDistance to copy:"
)
)
)
(setq DEFAULTDIST INPUTDIST)
(setq INPUTDIST DEFAULTDIST)
)
(if INPUTDIST
(progn
(command "._copy" "P" "" "0,0,0" "0,0,0")
(command "._move"
"P"
""
"0,0,0"
(list (* (cos INPUTANG) INPUTDIST) (* (sin INPUTANG) INPUTDIST))
)
(setq G-PR2 "Press to continue, to stop..."
G-QTY 2
)
(prompt (strcat ">> Qty: (2) " G-PR2))
(setq G-INPUT (grread NIL 4 0))
(while (or (= (nth 1 G-INPUT) 13) (= (nth 1 G-INPUT) 32))
(command "copy" "P" "" "0,0,0" "0,0,0")
(command "move"
"P"
""
"0,0,0"
(list (* (cos INPUTANG) INPUTDIST) (* (sin INPUTANG) INPUTDIST))
)
(setq G-QTY (1+ G-QTY)
G-PR (strcat ">> Qty: (" (itoa G-QTY) ") " G-PR2)
)
(prompt (strcat "\015" G-PR))
(setq G-INPUT (grread NIL 4 0))
)
)
)
)
)
) The other - Draw by Example - is intended to do exactly what your routine does. Do you mind if I use it in lieu of creating from scratch?
Thanks,
Jeffrey Ries