找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 1016|回复: 1

[文字] 【文字】删除字首

[复制链接]

已领礼包: 20个

财富等级: 恭喜发财

发表于 2020-7-7 23:23:52 | 显示全部楼层 |阅读模式
  • 插件名称 : 删除字首
  • 作  者 : marting
  • 运行环境 :XDRX API 晓东工具箱 
  • 发布时间 :2020-07-07
  • 命令名称 :xdtb_txtdelfirst
  • 插件介绍 :删除字首
  • 备  注 : (点击图片可以放大)
(点击图片可以放大)

晓东温馨提示 1、运行环境为 晓东工具箱XDRX API 的插件,请下载最新版本的 晓东工具箱XDRX API开发环境 一键安装
2、在ACAD中如何加载插件,请看 论坛插件使用方法
3、如果您有要求需要定制插件,请到 编程申请 论坛发帖求助

插件详细内容

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
本帖最后由 marting 于 2020-7-7 23:35 编辑

  1. (defun c:xdtb_txtdelfirst (/ e inx txt box box1 str index str1)
  2.   (defun _callback (dynpt)
  3.     (redraw)
  4.     (if        (and (setq e (xdrx-ipmonitor-getnested))
  5.              (xdrx-object-iskindof (caar e) "acdbtext")
  6.              (setq inx (XD::Text:IndexAtPoint (caar e) dynpt))
  7.              (setq box (XD::Text:PointAtIndex (caar e) (nth 1 inx)))
  8.         )
  9.       (progn (setq txt         (caar e)
  10.                    str         (car inx)
  11.                    index (nth 1 inx)
  12.              )
  13.              (xdrx-grdraw 1 -1 (xd::pnts:close box))
  14.       )
  15.     )
  16.   )
  17.   (xdrx-begin)
  18.   (xdrx-sysvar-push '("osmode" 545))
  19.   (xdrx-pointmonitor "_callback")
  20.   (if (and (setq pt (getpoint "\n拾取字符位置<退出>:"))
  21.            (< (1+ index) (xdrx-string-length str))
  22.       )
  23.     (progn (setq str1 (xdrx-string-mid str (1+ index)))
  24.            (setq box (xdrx-getpropertyvalue txt "textbox" t))
  25.            (xdrx-setpropertyvalue txt "textstring" str1)
  26.            (setq box1 (xdrx-getpropertyvalue txt "textbox" t))
  27.            (xdrx-entity-move txt
  28.              (nth 1 box1)
  29.              (nth 1 box)
  30.            )
  31.     )
  32.   )
  33.   (redraw)
  34.   (xdrx-pointmonitor)
  35.   (xdrx-end)
  36.   (princ)
  37. )


论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 166个

财富等级: 日进斗金

发表于 2020-7-8 08:20:45 | 显示全部楼层
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-3-29 17:40 , Processed in 0.364476 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表