乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 27|回复: 1

关于的程序

[复制链接]

57

主题

466

帖子

8

银币

中流砥柱

Rank: 25

铜币
694
发表于 2003-7-9 19:50:00 | 显示全部楼层 |阅读模式
下面是关于的程序
(defun c:hch ()                                
  (setq ss (ssget))
  (setq en (ssname ss 0))
  (setq lastent (entget en))               
  (regapp "MY_TAG")                        
  (setq        exdata                                       
'((-3
            ("MY_TAG"                        
             (1000 . "This is a new thing!")
            )
           )
          )                                 
)                                 
(setq        newent
         (append lastent exdata)
  )                                                
                                                
  (entmod newent)                           
)
                                               
;;;在上面的延伸资料 "This is a new thing!" 好象不能用变量吧
;;;我现在想用 (subst) 函数将它替换掉
;;;比如 (setq tag “定位块,割,单+0.010”)
;;;然后用 tag 将 "This is a new thing!" 替换掉
;;;我的这种想法可以吗
;;;___________________________________________________
(defun c:h_dim ()
  (setq tag (entget (car (entsel)) '("MY_TAG")))
  (setq tag1 (cdr (cadr (cadr (assoc -3 tag)))))
  (setq t_hight (getstring "\n请指定字高"))
  (setq p1 (getpoint "\ninsertion point"))
  (command "text" p1 t_hight 0 tag1)
  (princ)
)
回复

使用道具 举报

26

主题

3072

帖子

10

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3177
发表于 2003-7-10 12:41:00 | 显示全部楼层
可以直接使用变量,
(setq exdata (list (list -3 (list "MY_TAG" (cons 1000 tag)))))
回复

使用道具 举报

发表回复

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

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-7-4 00:57 , Processed in 1.275059 second(s), 67 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表