本帖最后由 xyp1964 于 2017-11-20 21:50 编辑
- ;; 混合文本增减复制
- (defun c:test1417 ()
- (xyp-CMDLA0)
- (setq int (Uint 1 "" "步距" int))
- (if (and (setq s1 (car (entsel "\n选择: ")))
- (xyp-etype s1 "text")
- )
- (progn
- (setq pt (xyp-9pt s1 5)
- lst (xyp-Get-HzEngNum (xyp-DXF 1 s1) 0)
- )
- (while (setq p1 (getpoint pt "\n基点<退出>: "))
- (setq lst (mapcar '(lambda (x)
- (cond ((setq a (distof x))
- (xyp-2str (+ a int))
- )
- ((setq b (xyp-Get-HzEngNum x 2))
- (setq b (vl-string->list (car b))
- b (mapcar '(lambda (x) (+ x int)) b)
- b (vl-list->string b)
- )
- )
- (t x)
- )
- )
- lst
- )
- s2 (xyp-copymove s1 pt p1)
- s2 (xyp-SubUpd s2 1 (xyp-strcat lst ""))
- )
- )
- )
- )
- (xyp-CMDLA1)
- )
|