ccaron
2007-07-23, 11:35 PM
Migrating Lisp routines to 2007 from 2004 and I can't seem to figure this one out. It returns "no function definition: ZZ_DIST. I can't find reference to this function ANYWHERE....Help
Please review the following code:
(defun c:cc ( / bgroup temp ang dist ent)
(setvar "cmdecho" 0)
(setvar "SAVETIME" 20)
(prompt "\nMacro: Continuous Copy\n")
(setq bgroup (ssget))
(setq ang (getreal "\nAngle for copy: "))
(setq ang (* pi (/ ang 180.0)))
(setq dist (getdist "\nDistance to copy: "))
(setq temp (strcat "@" (rtos dist 2 6) "<" (angtos ang 2 2)))
(while (/= temp "Exit")
(setq ent (entlast))
(command "_.copy" bgroup "" "0,0" temp)
(setq temp (zz_dist "PP" 4 1 "Exit" "Distance to copy" dist nil))
(if (and temp
(/= temp "Exit")
)
(setq dist temp)
)
(if (/= temp "Exit")
(progn
(setq temp (strcat "@" (rtos dist 2 6) "<" (angtos ang 0 4))
bgroup (ssadd))
(while (setq ent (entnext ent))
(if ent
(setq bgroup (ssadd ent bgroup))
)
)
)
)
)
(princ)
)
Thanks
Chris
Please review the following code:
(defun c:cc ( / bgroup temp ang dist ent)
(setvar "cmdecho" 0)
(setvar "SAVETIME" 20)
(prompt "\nMacro: Continuous Copy\n")
(setq bgroup (ssget))
(setq ang (getreal "\nAngle for copy: "))
(setq ang (* pi (/ ang 180.0)))
(setq dist (getdist "\nDistance to copy: "))
(setq temp (strcat "@" (rtos dist 2 6) "<" (angtos ang 2 2)))
(while (/= temp "Exit")
(setq ent (entlast))
(command "_.copy" bgroup "" "0,0" temp)
(setq temp (zz_dist "PP" 4 1 "Exit" "Distance to copy" dist nil))
(if (and temp
(/= temp "Exit")
)
(setq dist temp)
)
(if (/= temp "Exit")
(progn
(setq temp (strcat "@" (rtos dist 2 6) "<" (angtos ang 0 4))
bgroup (ssadd))
(while (setq ent (entnext ent))
(if ent
(setq bgroup (ssadd ent bgroup))
)
)
)
)
)
(princ)
)
Thanks
Chris