明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1507|回复: 1

请求一个程序

[复制链接]
发表于 2008-10-30 16:44 | 显示全部楼层 |阅读模式

请问有可以把文字合并的东西吗?

发表于 2008-10-30 23:29 | 显示全部楼层

(defun c:JI (/ ss1 ed str1 ss2 ed1 str2 sw1)
  (SETQ SS1 NIL)
  (SETQ STR1 NIL)
  (if (tblsearch "layer" "txt")
    (setvar "clayer" "txt")
    (progn
      (command "-layer"  "m"    "txt"     "c"       "7"
        "txt"  "lt"    "CONTINUOUS"        "txt"
        ""
       )
    )
  )
  (IF (SETQ SS1 (ENTSEL "\n 请选取第一个字符串:_____"))
    (PROGN
      (setq ed (entget (CAR ss1)))
      (REDRAW (car ss1) 3)
      (if (= "TEXT" (cdr (assoc 0 ed)))
 (setq str1 (cdr (Assoc 1 ed)))
 (prompt "第一个实体不是字符串")
      )
    )
  )
  (IF SS1
    (PROGN
      (IF (SETQ SS2 (ENTSEL "\n 请选取第二个字符串:______"))
 (progn
   (setq ed1 (entget (CAR ss2)))
   (if (= "TEXT" (cdr (assoc 0 ed1)))
     (setq str2 (cdr (Assoc 1 ed1)))
     (prompt "第二个实体不是字符串")
   )
 )
      )
    )
  )
  (if (and str1 str2)
    (PROGN
      (SETQ SW1 (STRCAT STR1 STR2))
      (entdel (car ss2))
      (SETQ ED (SUBST (cons 1 sw1) (Assoc 1 ed) ED))
      (ENTMOD ED)
    )
  )
  (princ)
)

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

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-2 10:20 , Processed in 0.180381 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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