本帖最后由 xyp1964 于 2025-2-8 20:58 编辑
 - (defun c:tt ()
- "文本计算式计算"
- (setq vvv (xyp-LispVer)
- fn-arx (cond ((>= vvv 2013) "geomcal.crx")
- ((< vvv 2013) "geomcal.arx")
- )
- )
- (if (not (member fn-arx (arx)))(arxload fn-arx) )
- (setq i -1)
- (if (setq ss (ssget '((0 . "text"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq tx (xyp-DXF 1 s1))
- (if (setq a (cal (xyp-CalFormat tx)))
- (xyp-SubUpd s1 1 (strcat tx "=" (vl-princ-to-string a)))
- )
- )
- )
- (princ)
- )
|