找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 887|回复: 1

[讨论]:索引标注软件

[复制链接]
发表于 2007-2-27 21:22:30 | 显示全部楼层 |阅读模式

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

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

×
索引标注软件   
(defun C:sy1( / lay scab scale pt1 pt2 pt3 pt4 pt5 pt6 high dx dy dx1 dy1
                txt1 txt2 txt3 be)
  (setvar "CMDECHO" 0)
  (setq lay (getvar "clayer"))
  (command "color" "bylayer")
  (command "layer" "m" "sy" "c" "g" "sy" "")
  (if (or (= nil (tblsearch "style" "xw"))
          (/= (cdr (assoc 40 (tblsearch "style" "xw"))) 0)
      )
    (command "STYLE" "xw" "txt" "0" ".8" "0" "n" "n" "n")
  )
  (if (= scab nil) (setq scab 100))
  (setq scale (getreal (strcat "\nScale <" (rtos scab 2 0) ">:")))
    (if (= scale nil) (setq scale scab))
    (setq scab scale)
  (setq pt1 (getpoint "\n第一点: "))
  (setq pt2 (getpoint pt1 "\n第二点: "))
  (setq dy (car pt1))
  (setq dy1 (car pt2))
  (setq be T)
  (if (> dy1 dy) (setq be nil))

  (setq txt1 (strcase (getstring "\n图集名称:") nil))
  (setq txt2 (getstring "\n详图编号:"))
  (setq txt3 (getstring "\n图集页次:"))

  (setq high (* scale 4))
    (setq dy (cadr pt2))
    (setq dx (car pt2))
    (if (= be nil)
       (setq dx1 (+ dx (* scale 5)))
       (setq dx1 (- dx (* scale 5)))
    )
    (setq dy1 (+ dy (* scale 1.15)))
    (setq pt3 (list dx1 dy1))
  (if (= be nil)
     (command "text" pt3 high "0" txt1)
     (command "text" "j" "r" pt3 high "0" txt1)
  )
  (if (= be nil)
    (progn
      (setq pt4 (polar pt2 0 (* scale (+ 5 (* 4 0.8 (strlen txt1)) 1.5 5))))
      (command "pline" pt1 "w" "0" "0" pt2 (polar pt4 0 (* 5 scale)) "")
      (command "circle" pt4 (* 5 scale))
    )
    (progn
      (setq pt4 (polar pt2 pi (* scale (+ 5 (* 4 0.8 (strlen txt1)) 1.5 5))))
      (command "pline" pt1 "w" "0" "0" pt2 (polar pt4 pi (* 5 scale)) "")
      (command "circle" pt4 (* 5 scale))
    )
  )

    (setq dy (cadr pt4))
    (setq dx (car pt4))
    (setq dx1 (- dx (* scale 1.2)))
    (setq dy1 (+ dy (* scale 0.9)))
    (setq pt5 (list dx1 dy1))
    (setq pt6 (polar pt5 0 (* scale 2.4)))
  (command "text" "j" "f" pt5 pt6 (* scale 3.3) txt2)

    (setq dx1 (- dx (* scale 1.2)))
    (setq dy1 (- dy (* scale 4.2)))
    (setq pt5 (list dx1 dy1))
    (setq pt6 (polar pt5 0 (* scale 2.4)))
  (command "text" "j" "f" pt5 pt6 (* scale 3.3) txt3)

  (command "layer" "s" lay "")
  (princ)
)      

这是从网上下载的索引标注软件,想请高手改动一下,不需要输图集名称,而是把图集名称固定下来,比如图集名称固定为TB2005
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
发表于 2022-3-22 16:47:31 | 显示全部楼层
看不到程序啊 索引标注软件
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-22 22:45 , Processed in 0.168123 second(s), 33 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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