 - ;; 需要e派工具箱(XCAD)的支持:http://yunpan.cn/QXQKsW9gAPmpF 访问密码 2ffa
- ;; 提取字符串一部份
- (defun c:test1579 ()
- (if (and (setq e1 (entsel "\n选择要截取的首位文本<退出>: "))
- (setq s1 (car e1))
- (setq p0 (cadr e1))
- (xyp-etype s1 "text")
- )
- (progn
- (setq p1 (xyp-Pt2X p0 (- (car (xyp-9pt s1 3)) (car p0)))
- tx (cadr (xyp-Text-List s1 p0 p1 nil))
- tx (car (xyp-Get-HzEngNum tx 0))
- s2 (xyp-SubUpd (xyp-copy s1) 1 tx)
- )
- (xyp-GrreadMove s2 (xyp-9pt s2 5))
- )
- )
- (princ)
- )
|