ljcgq
发表于 2004-6-16 11:36:00
本帖最后由 作者 于 2004-6-18 16:10:02 编辑 <br /><br /> 今天早上,完善了一步,不是从零开始,是从现在开始......打开“表.dwg "文件,然后加载运行...试试看...
;========================<BR>;闹钟<BR>;ljc 2004.6.15<BR>;========================<BR>(defun c:BB ()<BR> (command "ucs" "w")<BR> (setq os (getvar "osmode"))<BR> (setvar "osmode" 0) <BR> (setq ho (getvar "cmdecho"))<BR> (setvar "CMDECHO" 0) <BR> (command "erase" "all" "")<BR> (setq p(getpoint "请选择位置"))
(setq date (* (- (getvar "cdate") (fix (getvar "cdate")) ) 1000000))<BR> (setq hh(fix(/ date 10000))) <BR> (if (> hh 12) (setq hh (- hh 12)))<BR> (setq mmm (- (fix (/ date 100)) (* 100 (fix(/ date 10000))) ) ) <BR> (setq ss(- (fix date) (* 100 (fix (/ date 100))) ))<BR> (setq hs(fix(* (- date (fix date)) 100)) ) <BR> (setq sss(fix(+ ss (/ hs 100.0) 0.5)))<BR> <BR> (setq hj0(* (+ (/ hh -6.0) (/ mmm -360.0)) 180 ) )<BR> (setq mj0(* (+ (/ mmm -30.0) (/ sss -1800.0)) 180 ) )<BR> (setq sj0(* (/ sss -30.0) 180 ) )
(setq hj1(* (+ (/ hh -6.0) (/ mmm -360.0)) pi ) )<BR> (setq mj1(* (+ (/ mmm -30.0) (/ sss -1800.0)) pi ) )<BR> (setq sj1(* (/ sss -30.0) pi ) )
(COMMAND "-INSERT" "bp" p "" "" "")<BR> (COMMAND "-INSERT" "H" p "" "" hj0)<BR> (setq H (entget (entlast)))<BR> (COMMAND "-INSERT" "M" p "" "" mj0)<BR> (setq M (entget (entlast))) <BR> (COMMAND "-INSERT" "S" p "" "" sj0)<BR> (setq S (entget (entlast)))<BR> (SETQ N 1 nn 1 nnn 1)<BR> (while t<BR> (SETQ SJ (+ (* (/ n -30.0) pi ) sj1) )<BR> (setq S (subst (cons 50 SJ) (assoc 50 S) S))<BR> (SETQ mJ (+ (* (/ nnn -1800.0) pi ) mj1) )<BR> (setq m (subst (cons 50 mJ) (assoc 50 m) m))<BR> (entmod S)(entmod m)<BR> (COMMAND "DELAY" "1000")<BR> (if (= n 60) <BR> (progn<BR> (setq n 1) <BR> (SETQ hJ (+ (* (/ nn -360.0) pi ) hj1) )<BR> (setq h (subst (cons 50 hJ) (assoc 50 h) h)) <BR> (COMMAND "DELAY" "0")<BR> (entmod h) <BR> (setq nn (+ nn 1)) <BR> )<BR> (SETQ N (+ N 1))<BR> );if<BR> (setq nnn (+ nnn 1))<BR> (if (= nnn 3600) (setq nnn 1))<BR> );while<BR> <BR> (setvar "osmode" os)<BR> (setvar "cmdecho" ho) <BR>)
<BR>
CADghost
发表于 2004-6-16 11:47:00
<A name=27558><FONT color=#000066><B>ljcgq</B></FONT></A>你把时间调成北京时间吧
ljcgq
发表于 2004-6-16 12:08:00
不是北京时间,是你机器的系统时间。
ZGJ_GIS
发表于 2004-6-16 12:45:00
How to save autoCAD as picture active?
谢谢大家!<BR>
ljcgq
发表于 2004-6-16 14:34:00
用屏幕摄像软件呀。
CADghost
发表于 2004-6-16 15:57:00
不错,不错
顶
suntao008
发表于 2004-6-16 22:04:00
很棒,活学活用,大家要向你学习,是秘书长文章的启示吧???
ldb1420
发表于 2004-6-17 09:04:00
ljcgq发表于2004-6-16 11:29:00static/image/common/back.gifldb1420:你把表.dwg文件打开,然后加载程序,运行。
<BR>不知道为什么,没办法欣赏你的作品,还是会出现那个错误
ljcgq
发表于 2004-6-18 16:12:00
那我再上传一个给你。
FJQZ456
发表于 2004-6-18 21:03:00
了不起