- (terpri)
- (setq jd 2)
- (prompt "\n当前精度0.00,设置精度,请退出后输入jdsz进行设置")
- (DEFUN C:jdsz ()
- (initget 1 "0 1 2 3 4 5 6 7 8 9")
- (setq jd (getint "\n 请输入精度位数[整数(0)/1位(1)/2位(2)/3位(3)/4位(4)]:"))
- )
- (defun c:nadd (/ E ENEW NV nv1 nv2 P2 p1 S)
-
- (if (and (setq e (car (entsel "\n选择数字文本: ")))
- (setq e (vlax-ename->vla-object e))
- (or (= "AcDbText" (vla-get-ObjectName e))
- (= "AcDbMText" (vla-get-ObjectName e))
- )
- )
- (progn
- (setq s (vla-get-TextString e))
- (setq nv 1)
- (setq p1 (getpoint "\n指定基点:"))
- (while (setq p2 (getpoint P1 "\n下一点 :") )
- (setq nv1 (strcat "\n输入递增值<" (itoa nv) ">:"))
- (setq nv (if(setq nv2 (getint nv1)) nv2 nv))
- (setq enew (vla-copy e))
- (vla-put-textstring enew (setq s (rtos (+ (atof s) nv) 2 jd)))
- (vla-put-InsertionPoint enew (vlax-3d-point p2))
- )
- )
- (princ "\n选中的不是文本或没有选择到实体.")
- )
- (princ)
- )
|