找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 862|回复: 4

[求助] [求助]:哪个坐标标注程序比较好用?

[复制链接]
发表于 2005-3-10 22:12:43 | 显示全部楼层 |阅读模式

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

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

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

已领礼包: 1个

财富等级: 恭喜发财

发表于 2005-3-10 23:12:33 | 显示全部楼层
没有一个程序是完美的,只有看你的需要,因为每个作者一般都是针对自己的行业进行优化编程。
具体要看你的需要。
适合你的才是最好的!
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

使用道具 举报

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

使用道具 举报

发表于 2005-3-16 22:24:09 | 显示全部楼层
试试我的!要求1:1绘图,1:1000出图!


  1. ;;;坐标标注程序
  2. ;;;本程序为一坐标标注程序,标注按照左手坐标系进行。适用于总平面图坐标标注。
  3. ;;;版权所有,未经许可不得复制、散发。
  4. ;;;王磊
  5. ;;;2002年5月9日
  6. ;;;zb1用于标注世界坐标
  7. ;;;ZB2用于标注用户坐标


  8. ;;;以下程序用于世界坐标系1:1画图1:1000出图时坐标标注
  9. ;;;二○○二年四月二十四日调整如下:
  10. ;;;可以在任何用户坐标系下进行世界坐标系的标注,
  11. ;;;标注文本平行于当前坐标系
  12. ;;;
  13. ;;;2004年6月30日增加set_ini()、set_close()、err_new (msg)
  14. ;;;用于错蟠?恚?绦蛑卸鲜笨梢曰指闯绦蚱舳??淖刺?
  15. ;;;
  16. ;;;2005年3月将两个命令合并为一个命令zb
  17. ;;;
  18. (defun set_ini ()

  19.   (if (= (getvar "useri1") 0)
  20.     (setq plot_scale 1000)
  21.     (setq plot_scale (getvar "useri1"))
  22.   ) ;_ end of if
  23.   (if (= (getvar "userr1") 0)
  24.     (setq TextHeight 2.5)
  25.     (setq TextHeight (getvar "userr1"))
  26.   ) ;_ end of if

  27.   (setq unit_convert 1000)

  28.   (setq cmdsave (getvar "cmdecho"))
  29.   (setq os (getvar "OSMODE"))
  30.   (setq dz (getvar "dimzin"))

  31.   (setvar "cmdecho" 0)
  32.   (setvar "OSMODE" 33)
  33.   (setvar "dimzin" 1)
  34. ) ;_ end of defun

  35. (defun err_new (msg)
  36.   (princ msg)
  37.   (set_close)
  38. ) ;_ end of defun

  39. (defun set_close ()
  40.   (setvar "OSMODE" os)
  41.   (setvar "cmdecho" cmdsave)
  42.   (setvar "dimzin" dz)
  43.   (setq *error* err_old)
  44. ) ;_ end of defun
  45. (defun c:zb ()

  46.   (initget 128 "L U W")
  47.   (setq        kw
  48.          (getkword
  49.            "[修改引出线长度(L)/用户坐标系坐标标注(P)/世界坐标系坐标标注(W)]<W>: "
  50.          ) ;_ end of getkword
  51.   ) ;_ end of setq
  52.   (if (or (= kw nil) (= kw "W"))
  53.     (zb:zb1)
  54.     (if        (= kw "U")
  55.       (zb:zb2)
  56.       (if (= kw "L")
  57.         (PROGN (zb:yinxinchangdu)
  58.                (C:ZB)
  59.         )

  60.       )
  61.     )
  62.   )
  63.   (PRINC)
  64. )





  65. (defun ZB:zb1 (/ os cmdsave dt Gro_1 Gro_2 Gro_3 Gro_4)
  66.   (setq        err_old        *error*
  67.         *error*        err_new
  68.   ) ;_ end of setq
  69.   (set_ini)
  70.   (setq zuobiaodian (getpoint "\n点取需要标注的点:"))
  71.   (setvar "OSMODE" 0)
  72. ;;;(print zuobiaodian)
  73.   (setq        charudian0
  74.          (getpoint "\n点取文本位置:" zuobiaodian)
  75.   ) ;_ end of setq
  76.   (setq        dt  (getcfg "AppData/ZuoBiao/YinXianChangDu")
  77.         ang (angle zuobiaodian charudian0)

  78.   ) ;_ end of setq
  79.   (if (or (= "" dt) (= nil dt))
  80.     (setq dt (zb:yinxinchangdu))
  81.   ) ;_ end of if
  82.   (setq dt (* (distof dt) plot_scale))
  83.   (if (and (<= 0 ang) (<= ang (* pi 0.5)))
  84.     (setq charudian
  85.            (polar zuobiaodian (* pi 0.25) dt)
  86.           just "bl"
  87.     ) ;_ end of setq
  88.     (if        (<= ang pi)
  89.       (setq charudian
  90.              (polar zuobiaodian (* pi 0.75) dt)
  91.             just "right"
  92.       ) ;_ end of setq
  93.       (if (<= ang (* pi 1.5))
  94.         (setq charudian
  95.                (polar zuobiaodian (* pi 1.25) dt) ;_ end of polar
  96.               just "right"
  97.         ) ;_ end of setq
  98.         (if (<= ang (* pi 2))
  99.           (setq        charudian
  100.                  (polar zuobiaodian (* pi 1.75) dt) ;_ end of polar
  101.                 just "bl"
  102.           ) ;_ end of setq
  103.         ) ;_ end of setq
  104.       ) ;_ end of if
  105.     ) ;_ end of if
  106.   ) ;_ end of if

  107.   (setq        charudianx
  108.          (list (car charudian)
  109.                (+ (cadr charudian) (* (/ textheight 4) plot_scale))
  110.                (caddr charudian)
  111.          ) ;_ end of list
  112.   ) ;_ end of setq
  113.   (setq        charudiany
  114.          (list (car charudian)
  115.                (- (cadr charudian)
  116.                   (* (+ (/ textheight 4) textHeight) plot_scale)
  117.                ) ;_ end of -
  118.                (caddr charudian)
  119.          ) ;_ end of list
  120.   ) ;_ end of setq


  121.   (setq zuobiaoX (/ (cadr (trans zuobiaodian 1 0)) unit_convert))
  122. ;;;(trans zuobiaodian 1 0 )将用户坐标系的点转换为世界坐标系的点
  123.   (setq zuobiaoy (/ (car (trans zuobiaodian 1 0)) unit_convert))
  124.   (setq strX (strcat "X=" (rtos (float zuobiaox) 2 3)))
  125.   (setq stry (strcat "Y=" (rtos (float zuobiaoy) 2 3)))
  126.   (command "_line" zuobiaodian charudian "")
  127.   (setq Gro_4 (entlast))
  128.   (setq pntchrd (car charudian))
  129.   (setq pntzbd (car zuobiaodian))

  130.   (setq TextHeight_real (* TextHeight plot_scale))
  131.   (if (< pntchrd pntzbd)

  132.     (progn

  133.       (command "_text" charudianx TextHeight_real 0 strX)
  134.       (setq Gro_1 (entlast))
  135.       (setq ssl nil)
  136.       (setq ssl (ssget "l"))

  137.       (setq maxpntX (cadr (textbox (entget (entlast)))))
  138.       (command "_text" charudiany TextHeight_real 0 stry)
  139.       (setq Gro_2 (entlast))
  140.       (setq entl (entlast))
  141.       (ssadd entl ssl)
  142.       (setq maxpntY (cadr (textbox (entget (entlast)))))
  143.       (setq xianchang (car maxpntx))
  144.       (if (< (car maxpntx) (car maxpnty))
  145.         (setq xianchang (car maxpnty))
  146.       ) ;_ end of if
  147.       (setq endpnt (list (- (car charudian) xianchang)
  148.                          (cadr charudian)
  149.                          (caddr charudian)

  150.                    ) ;_ end of list
  151.       ) ;_ end of setq
  152.       (command "_move" ssl "" charudian endpnt)
  153.       (setq ssl nil)

  154.       (command "_line" charudian endpnt "")
  155.       (setq Gro_3 (entlast))
  156.     ) ;_ end of progn
  157.     (progn
  158.       (command "_text" charudianx TextHeight_real 0 strX)
  159.       (setq Gro_1 (entlast))
  160.       (setq maxpntX (cadr (textbox (entget (entlast)))))
  161.       (command "_text" charudiany TextHeight_real 0 stry)
  162.       (setq Gro_2 (entlast))
  163.       (setq maxpnty (cadr (textbox (entget (entlast)))))
  164.       (setq xianchang (car maxpntx))
  165.       (if (< (car maxpntx) (car maxpnty))
  166.         (setq xianchang (car maxpnty))
  167.       ) ;_ end of if

  168.       (setq endpnt (list (+ (car charudian) xianchang)
  169.                          (cadr charudian)
  170.                          (caddr charudian)
  171.                    ) ;_ end of list
  172.       ) ;_ end of setq
  173. ;;;      (princ endpnt)
  174.       (command "_line" charudian endpnt "")
  175.       (setq Gro_3 (entlast))
  176.     ) ;_ end of progn
  177.   ) ;_ end of if
  178.   (zb:makgrp (list Gro_1 Gro_2 Gro_3 Gro_4)
  179.              "In use by ZuoBiao"
  180.   ) ;_ end of bg:makgrp



  181.   (set_close)
  182.   (gc)
  183.   (princ)
  184. ) ;_ end of defun


  185. ;;;以下程序用于用户坐标系1:1画图1:1000出图时坐标标注
  186. ;;;二○○二年四月二七日将斜线固定为45度
  187. (defun zb:zb2 (/ os cmdsave dt Gro_1 Gro_2 Gro_3 Gro_4)

  188.   (setq        err_old        *error*
  189.         *error*        err_new
  190.   ) ;_ end of setq

  191.   (set_ini)

  192.   (setq zuobiaodian (getpoint "\n点取需要标注的点:"))

  193.   (trans zuobiaodian 0 1)
  194. ;;;将世界坐标系的点转换为用户坐标系的点。

  195.   (setvar "OSMODE" 0)

  196.   (setq        charudian0
  197.          (getpoint "\n点取文本位置:" zuobiaodian)
  198.   ) ;_ end of setq

  199. ;;;
  200.   (setq        dt  (getcfg "AppData/ZuoBiao/YinXianChangDu")
  201.         ang (angle zuobiaodian charudian0)

  202.   ) ;_ end of setq
  203.   (if (or (= "" dt) (= nil dt))
  204.     (setq dt (zb:yinxinchangdu))
  205.   ) ;_ end of if
  206.   (setq dt (* (distof dt) plot_scale))
  207.   (if (and (<= 0 ang) (<= ang (* pi 0.5)))
  208.     (setq charudian
  209.            (polar zuobiaodian (* pi 0.25) dt)
  210.           just "bl"
  211.     ) ;_ end of setq
  212.     (if        (<= ang pi)
  213.       (setq charudian
  214.              (polar zuobiaodian (* pi 0.75) dt)
  215.             just "right"
  216.       ) ;_ end of setq
  217.       (if (<= ang (* pi 1.5))
  218.         (setq charudian
  219.                (polar zuobiaodian (* pi 1.25) dt) ;_ end of polar
  220.               just "right"
  221.         ) ;_ end of setq
  222.         (if (<= ang (* pi 2))
  223.           (setq        charudian
  224.                  (polar zuobiaodian (* pi 1.75) dt) ;_ end of polar
  225.                 just "bl"
  226.           ) ;_ end of setq
  227.         ) ;_ end of setq
  228.       ) ;_ end of if
  229.     ) ;_ end of if
  230.   ) ;_ end of if




  231. ;;;

  232.   (setq        charudianx
  233.          (list (car charudian)
  234.                (+ (cadr charudian) (* (/ textheight 4) plot_scale))
  235.                (caddr charudian)
  236.          ) ;_ end of list
  237.   ) ;_ end of setq
  238.   (setq        charudiany
  239.          (list (car charudian)
  240.                (- (cadr charudian)
  241.                   (* (+ (/ textheight 4) textHeight) plot_scale)
  242.                ) ;_ end of -
  243.                (caddr charudian)
  244.          ) ;_ end of list
  245.   ) ;_ end of setq


  246.   (setq zuobiaoX (/ (cadr zuobiaodian) unit_convert))
  247.   (setq zuobiaoy (/ (car zuobiaodian) unit_convert))
  248.   (setq strX (strcat "A=" (rtos (float zuobiaox) 2 3)))
  249.   (setq stry (strcat "B=" (rtos (float zuobiaoy) 2 3)))
  250.   (command "_line" zuobiaodian charudian "")
  251.   (setq Gro_4 (entlast))
  252.   (setq pntchrd (car charudian))
  253.   (setq pntzbd (car zuobiaodian))
  254.   (setq TextHeight_real (* TextHeight plot_scale))

  255.   (if (< pntchrd pntzbd)
  256.     (progn
  257.       (command "_text" charudianx TextHeight_real 0 strX)
  258.       (setq Gro_1 (entlast))
  259.       (setq ssl (ssget "l"))
  260.       (setq maxpntX (cadr (textbox (entget (entlast)))))


  261.       (command "_text" charudiany TextHeight_real 0 stry)
  262.       (setq Gro_2 (entlast))
  263.       (setq entl (entlast))
  264.       (ssadd entl ssl)
  265.       (setq maxpntY (cadr (textbox (entget (entlast)))))

  266.       (setq xianchang (car maxpntx))
  267.       (if (< (car maxpntx) (car maxpnty))
  268.         (setq xianchang (car maxpnty))
  269.       ) ;_ end of if
  270.       (setq endpnt (list (- (car charudian) xianchang)
  271.                          (cadr charudian)
  272.                          (caddr charudian)

  273.                    ) ;_ end of list
  274.       ) ;_ end of setq
  275.       (command "_move" ssl "" charudian endpnt)
  276.       (setq ssl nil)
  277.       (command "_line" charudian endpnt "")
  278.       (setq Gro_3 (entlast))
  279.     ) ;_ end of progn
  280.     (progn

  281.       (command "_text" charudianx TextHeight_real 0 strX)
  282.       (setq Gro_1 (entlast))
  283.       (setq maxpntX (cadr (textbox (entget (entlast)))))

  284.       (command "_text" charudiany TextHeight_real 0 stry)
  285.       (setq Gro_2 (entlast))
  286.       (setq maxpnty (cadr (textbox (entget (entlast)))))
  287.       (setq xianchang (car maxpntx))
  288.       (if (< (car maxpntx) (car maxpnty))
  289.         (setq xianchang (car maxpnty))
  290.       ) ;_ end of if

  291.       (setq endpnt (list (+ (car charudian) xianchang)
  292.                          (cadr charudian)
  293.                          (caddr charudian)
  294.                    ) ;_ end of list
  295.       ) ;_ end of setq

  296.       (command "_line" charudian endpnt "")
  297.       (setq Gro_3 (entlast))

  298.     ) ;_ end of progn
  299.   ) ;_ end of if
  300.   (zb:makgrp (list Gro_1 Gro_2 Gro_3 Gro_4)
  301.              "In use by ZuoBiao"
  302.   ) ;_ end of bg:makgrp

  303.   (set_close)
  304.   (gc)
  305.   (princ)

  306. ) ;_ end of defun



  307. (defun zb:yinxinchangdu        (/ l dt)
  308.   (setq dt (getcfg "AppData/ZuoBiao/YinXianChangDu"))
  309.   (if dt
  310.     (progn (princ (strcat "\n输入新的引出线长度<L=" dt ">:"))
  311.            (setq l (getreal))
  312.            (if l
  313.              (setq dt (rtos l 2 2))
  314.              (setq dt dt)
  315.            ) ;_ end of if
  316.     ) ;_ end of progn
  317.     (progn (princ (strcat "\n输入新的引出线长度<L=5>:"))
  318.            (setq l (getreal))
  319.            (if l
  320.              (setq dt (rtos l 2 2))
  321.              (setq dt "5")
  322.            ) ;_ end of if
  323.     ) ;_ end of progn
  324.   ) ;_ end of if
  325.   (setcfg "AppData/ZuoBiao/YinXianChangDu" dt)
  326. ) ;_ end of defun

  327. (defun zb:makgrp (LST DESC / NAM EN LST GDICT GDATA)
  328.   (setq
  329.     NAM        (strcat        "ZuoBiao"
  330.                 (substr (rtos (getvar "CDATE") 2 8) 10)
  331.         ) ;_ end of strcat
  332.   ) ;_ end of setq
  333.   (command "_.-group" "_create" NAM DESC)
  334.   (foreach EN LST (command EN))
  335.   (command "")
  336.   (setq        GDICT (dictsearch (namedobjdict) "ACAD_GROUP")
  337.         GDATA (dictsearch (cdr (assoc -1 GDICT)) NAM)
  338.         GDATA (subst (cons 70 1) (assoc 70 GDATA) GDATA)
  339.   ) ;_ end of setq
  340.   (dictrename (cdr (assoc -1 GDICT)) NAM "*A")
  341.   (entmod GDATA)
  342. ) ;_ end of defun
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-9-28 02:30 , Processed in 0.281206 second(s), 38 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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