马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 marting 于 2020-7-7 23:35 编辑
 - (defun c:xdtb_txtdelfirst (/ e inx txt box box1 str index str1)
- (defun _callback (dynpt)
- (redraw)
- (if (and (setq e (xdrx-ipmonitor-getnested))
- (xdrx-object-iskindof (caar e) "acdbtext")
- (setq inx (XD::Text:IndexAtPoint (caar e) dynpt))
- (setq box (XD::Text:PointAtIndex (caar e) (nth 1 inx)))
- )
- (progn (setq txt (caar e)
- str (car inx)
- index (nth 1 inx)
- )
- (xdrx-grdraw 1 -1 (xd::pnts:close box))
- )
- )
- )
- (xdrx-begin)
- (xdrx-sysvar-push '("osmode" 545))
- (xdrx-pointmonitor "_callback")
- (if (and (setq pt (getpoint "\n拾取字符位置<退出>:"))
- (< (1+ index) (xdrx-string-length str))
- )
- (progn (setq str1 (xdrx-string-mid str (1+ index)))
- (setq box (xdrx-getpropertyvalue txt "textbox" t))
- (xdrx-setpropertyvalue txt "textstring" str1)
- (setq box1 (xdrx-getpropertyvalue txt "textbox" t))
- (xdrx-entity-move txt
- (nth 1 box1)
- (nth 1 box)
- )
- )
- )
- (redraw)
- (xdrx-pointmonitor)
- (xdrx-end)
- (princ)
- )
|