< ><FONT face=宋体>(defun c:rq(/ entn entl text high)
(setq entn (car (entsel "选择加年月日的文字")))
(setq entl (entget entn))
(setq ti (rtos (getvar "cdate") 2 6))
(setq yy (substr ti 1 4))
(setq mm (substr ti 5 2))
(setq mm (atoi mm))
(setq mm (itoa mm))
(setq dd (substr ti 7 2))
(setq dd (atoi dd))
(setq dd (itoa dd))
(setq text (strcat yy "." mm "." dd))
(setq entl (subst (cons 1 text) (assoc 1 entl) entl))
(entmod entl)
(princ)
)
画图画得晕乎乎的时候不用去想日期,呵呵</FONT> </P>
<P>启动命令:<FONT face=宋体>rq</FONT></P> |