iCAx开思工具箱
标题:
CAD自动标注
[打印本页]
作者:
zhaocm
时间:
2009-5-9 16:13
标题:
CAD自动标注
不知道有没有免费的自动标注工具?一定要实用的哦。。。。Please
作者:
myqhx
时间:
2009-5-14 08:02
有,CAD中自带的也有,还有就是外挂
作者:
zhaocm
时间:
2009-5-21 22:27
就是要找外挂呀。。能陈述道来不?
作者:
小虾
时间:
2009-5-22 00:52
哈哈
要什么样的自动标注?掏钱我帮你写一个如何
作者:
晓月清风1
时间:
2009-5-24 19:52
楼上的没有职业道德!资源不共享!差劲!
作者:
tzhuzzb
时间:
2009-6-12 19:25
燕秀論壇有一個免費的.雖然功能有所限制.但共享的功能也還是很強大.在cad二次開發版塊里面
作者:
basic920
时间:
2009-6-15 16:47
听说燕秀工具还可以,我是自己搞了点LISP用.
作者:
hrz1220
时间:
2009-7-18 10:37
听说燕秀工具还可以,我是自己搞了点LISP用.
作者:
ljttjl
时间:
2009-7-18 22:04
以下位置可以下载:
明经CAD社区 → 工程篇 → 建筑工程 → [原创]引线标注X和Y坐标值的程序
https://www.mjtd.com/BBS/dispbbs.asp?boardID=26&ID=72509&page=1
作者:
sharon8259
时间:
2009-7-24 15:53
先下载下来用用!
作者:
NAXX
时间:
2009-10-11 23:27
我也想要个零件自动标注~~~冲模的~~
作者:
wangzheming
时间:
2009-10-30 19:17
哦
我本来是来索取的
百来了哦
作者:
huyou88
时间:
2009-12-17 19:48
这个有点难
作者:
sayit
时间:
2009-12-26 11:58
(defun ss_ssxx ()
(setq ssx nil
ssy nil
ssoo nil
po-check-multy
'()
po-check-multx
'()
po-check-multo
'()
)
(if ss
(progn
(setq i (sslength ss))
(while (> i 0)
(setq i (- i 1))
(setq ee (ssname ss i))
(setq e (entget ee))
(setq p10 (cdr (assoc 10 e)))
(setq p11 (cdr (assoc 11 e)))
(cond
((< (abs (- (nth 0 p10) (nth 0 p11))) 0.0001)
(if (not (member (nth 0 p10) po-check-multy))
(setq po-check-multy
(append (list (nth 0 p10)) po-check-multy)
po-check-multy1 po-check-multy
)
)
(if (= n5-value "1")
(progn
(if
(or
(< (abs (rem (- (nth 0 p10) (nth 0 cen)) 5.0)) 0.001)
(<
(abs (- (abs (rem (- (nth 0 p10) (nth 0 cen)) 5.0))
5.0
)
)
0.001
)
)
(if (null ssy)
(setq ssy (ssadd ee))
(setq ssy (ssadd ee ssy))
)
)
)
(progn
(if (null ssy)
(setq ssy (ssadd ee))
(setq ssy (ssadd ee ssy))
)
)
)
)
((< (abs (- (nth 1 p10) (nth 1 p11))) 0.0001)
(if (not (member (nth 1 p10) po-check-multx))
(setq po-check-multx
(append (list (nth 1 p10)) po-check-multx)
po-check-multx1 po-check-multx
)
)
(if (= n5-value "1")
(progn
(if
(or
(< (abs (rem (- (nth 1 p10) (nth 1 cen)) 5.0)) 0.001)
(<
(abs (- (abs (rem (- (nth 1 p10) (nth 1 cen)) 5.0))
5.0
)
)
0.001
)
)
(if (null ssx)
(setq ssx (ssadd ee))
(setq ssx (ssadd ee ssx))
)
)
)
(progn
(if (null ssx)
(setq ssx (ssadd ee))
(setq ssx (ssadd ee ssx))
)
)
)
)
)
)
)
)
(if sso
(progn
(setq i (sslength sso))
(while (> i 0)
(setq i (- i 1))
(setq ee (ssname sso i))
(setq e (entget ee))
(setq p10 (cdr (assoc 10 e)))
(if (not (member p10 po-check-multo))
(setq po-check-multo
(append (list p10) po-check-multo)
)
)
(if (= n5-value "1")
(progn
(if
(or
(< (abs (rem (- (nth 0 p10) (nth 0 cen)) 5.0)) 0.001)
(<
(abs
(- (abs (rem (- (nth 0 p10) (nth 0 cen)) 5.0)) 5.0)
)
0.001
)
)
(if (null ssoo)
(setq ssoo (ssadd ee))
(setq ssoo (ssadd ee ssoo))
)
)
)
(progn
(if (null ssoo)
(setq ssoo (ssadd ee))
(setq ssoo (ssadd ee ssoo))
)
)
)
)
)
)
)
(defun draw_ssx (/ cen1)
(setq i (sslength ssx))
(while (> i 0)
(setq i (- i 1))
(setq ee (ssname ssx i))
(setq e (entget ee))
(setq p10 (cdr (assoc 10 e)))
(setq p11 (cdr (assoc 11 e)))
(if (= mult-ad-value "0")
(if (not (member (nth 1 p10) po-check-multx))
(setq p10 nil
p11 nil
)
(setq po-check-multx
(vl-remove (nth 1 p10) po-check-multx)
)
)
)
(if (and p10 p11)
(progn
(if (> (nth 0 p10) (nth 0 p11))
(setq pd p10
px p11
)
(setq pd p11
px p10
)
)
(setq
pd (list (- (nth 0 pd) (nth 0 cen))
(- (nth 1 pd) (nth 1 cen))
)
)
(setq
px (list (- (nth 0 px) (nth 0 cen))
(- (nth 1 px) (nth 1 cen))
)
)
(setq cen1 (list 0 0))
(if (< (abs (nth 1 pd)) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd 0 (* a j (getvar "DIMTXT"))))
(if
(ssget "C" pp (polar pp 0 (* a (getvar "DIMTXT") 2.0)))
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "_.dimordinate" pd pp)
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(prompt ".")
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar px pi (* a j (getvar "DIMTXT"))))
(if
(ssget "c" pp (polar pp pi (* a (getvar "DIMTXT") 2.0)))
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" px pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(if (> (- (distance px cen1) (distance pd cen1)) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar px pi (* a j (getvar "DIMTXT"))))
(if (ssget "c"
pp
(polar pp pi (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" px pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd 0 (* a j (getvar "DIMTXT"))))
(if (ssget "c"
pp
(polar pp 0 (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
)
)
)
)
)
)
)
(defun draw_ssy (/ cen1)
(setq i (sslength ssy))
(while (> i 0)
(setq i (- i 1))
(setq ee (ssname ssy i))
(setq e (entget ee))
(setq p10 (cdr (assoc 10 e)))
(setq p11 (cdr (assoc 11 e)))
(if (= mult-ad-value "0")
(if (not (member (nth 0 p10) po-check-multy))
(setq p10 nil
p11 nil
)
(setq po-check-multy
(vl-remove (nth 0 p10) po-check-multy)
)
)
)
(if (and p10 p11)
(progn
(if (> (nth 1 p10) (nth 1 p11))
(setq pd p10
px p11
)
(setq pd p11
px p10
)
)
(setq
pd (list (- (nth 0 pd) (nth 0 cen))
(- (nth 1 pd) (nth 1 cen))
)
)
(setq
px (list (- (nth 0 px) (nth 0 cen))
(- (nth 1 px) (nth 1 cen))
)
)
(setq cen1 (list 0 0))
(if (< (abs (nth 0 pd)) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd (* pi 0.5) (* a j (getvar "DIMTXT"))))
(if
(ssget "c"
pp
(polar pp (* pi 0.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar px (* pi 1.5) (* a j (getvar "DIMTXT"))))
(if
(ssget "c"
pp
(polar pp (* pi 1.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" px pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(if (> (- (distance px cen1) (distance pd cen1)) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq
pp (polar px (* pi 1.5) (* a j (getvar "DIMTXT")))
)
(if
(ssget
"c"
pp
(polar pp (* pi 1.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" px pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq
pp (polar pd (* pi 0.5) (* a j (getvar "DIMTXT")))
)
(if
(ssget
"c"
pp
(polar pp (* pi 0.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
)
)
)
)
)
)
)
(defun draw_ssoo (/ cen1)
(setq i (sslength ssoo))
(while (> i 0)
(setq i (- i 1))
(setq ee (ssname ssoo i))
(setq e (entget ee))
(setq p10 (cdr (assoc 10 e)))
(setq p11 p10)
(if (= mult-ad-value "0")
(progn
(if (member p10 po-check-multo)
(setq po-check-multo (vl-remove p10 po-check-multo))
(setq p10 nil
p11 nil
)
)
(if p10
(if (member (nth 0 p10) po-check-multy1)
(setq p10 nil)
)
)
(if p11
(if (member (nth 1 p11) po-check-multx1)
(setq p11 nil)
)
)
)
)
(if (or p10 p11)
(progn
(if p10
(setq pd p10)
)
(if p11
(setq pd p11)
)
(setq
pd (list (- (nth 0 pd) (nth 0 cen))
(- (nth 1 pd) (nth 1 cen))
)
)
(setq cen1 (list 0 0))
(if (< (nth 0 pd) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd pi (* a j (getvar "DIMTXT"))))
(if
(ssget "C" pp (polar pp pi (* a (getvar "DIMTXT") 2.0)))
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd 0 (* a j (getvar "DIMTXT"))))
(if
(ssget "C" pp (polar pp 0 (* a (getvar "DIMTXT") 2.0)))
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
)
(if (> (nth 1 pd) 0.0001)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd (* pi 0.5) (* a j (getvar "DIMTXT"))))
(if
(ssget "C"
pp
(polar pp (* pi 0.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
(progn
(setq j (atoi check-inters-len1-value))
(while (< j (atoi check-inters-len-value))
(setq pp (polar pd (* pi 1.5) (* a j (getvar "DIMTXT"))))
(if
(ssget "C"
pp
(polar pp (* pi 1.5) (* a (getvar "DIMTXT") 2.0))
)
(setq j (+ j (atoi check-inters-len1-value)))
(setq j (atoi check-inters-len-value))
)
)
(vl-cmdf "dimordinate" pd pp)
(prompt ".")
(setq linkstr
(strcat "LCAD命令:AD"
"\n"
"尺寸图层:" (nth 9 lcad_set_layer_list)
"\n"
"尺寸样式:" (getvar "DIMSTYLE")
)
)
(set-description (entlast) linkstr " ")
(if (null ss1)
(setq ss1 (ssadd (entlast)))
(setq ss1 (ssadd (entlast) ss1))
)
)
)
)
)
)
)
(defun set_adim_la ()
(if sel_la_n
(if (not (member (nth (atoi sel_la_n) adim_la_list) adim_la_add)
)
(progn
(setq adim_la_add
(append (list (nth (atoi sel_la_n) adim_la_list))
adim_la_add
)
)
(input_clb "adim-la" adim_la_add)
)
)
)
(if (< (atoi sel_la_n) (- (length adim_la_list) 1))
(progn
(setq sel_la_n (itoa (+ (atoi sel_la_n) 1)))
(set_tile "all-la" sel_la_n)
(set_tile "adim-la" sel_la_n_r)
)
)
)
(defun remove_adim_la ()
(if (and sel_la_n_r adim_la_add)
(progn
(setq adim_la_add
(vl-remove (nth (atoi sel_la_n_r) adim_la_add)
adim_la_add
)
)
(input_clb "adim-la" adim_la_add)
)
)
(if (> (atoi sel_la_n_r) 0)
(progn
(setq sel_la_n_r (itoa (- (atoi sel_la_n_r) 1)))
(set_tile "adim-la" sel_la_n_r)
)
(set_tile "adim-la" sel_la_n_r)
)
)
(defun get-sel-value ()
$value
)
(defun get-sel-all-line-value ()
(setq all-line-value $value)
(cond ((= all-line-value "0")
(mode_tile "add-la" 0)
(mode_tile "remove-la" 0)
(mode_tile "all-la" 0)
(mode_tile "adim-la" 0)
)
((= all-line-value "1")
(mode_tile "add-la" 1)
(mode_tile "remove-la" 1)
(mode_tile "all-la" 1)
(mode_tile "adim-la" 1)
(setq adim-la-value nil
adim_la_add adim-la-value
)
(input_clb "adim-la" adim-la-value)
)
)
)
(defun cancel-value ()
(setq userclick nil
check-inters-len-value
(get_tile "check-inters-len")
check-inters-len1-value
(get_tile "check-inters-len1")
)
)
(defun accept-value ()
(setq userclick T
check-inters-len-value
(get_tile "check-inters-len")
check-inters-len1-value
(get_tile "check-inters-len1")
)
)
作者:
sayit
时间:
2009-12-26 11:58
(defun c:ad (/ old cen ss
ssx ssy ee e
i j p10 p11
a pd px pp
oldla xx xxx ss1
dcl_id adim_la_list make_la_name make_la_name1
sel_la_n key-add adim_la_add sel_la_n_r
userclick ssget-list make-ssget-i corner-po1
corner-po2 ssget-list1 ssget-list2 sso
po-check-multy po-check-multx
po-check-multo ssoo po-check-multy1
po-check-multx1 check-p10 old_adim_osmode
old_adim_layer aaa b
n nn pcfill commandlist
)
(grtext -1 "***LCAD 自动坐标尺寸标注***")
(lcad-err-rec)
(if (not (tblsearch "DIMSTYLE" "LCAD"))
(c:cc)
)
(if (= lcaddimscale 0)
(progn
(initget 7)
(setq a (getreal "\n 尺寸标注比例不能=0! DIMSCALE="))
(setvar "dimscale" a)
)
(progn
(setvar "dimscale" lcaddimscale)
(setq a lcaddimscale)
)
)
(setvar "osmode" 45)
(setq adim_la_list '())
(setq make_la_name (tblnext "LAYER" T))
(while make_la_name
(setq make_la_name1 (cdr (assoc 2 make_la_name)))
(setq adim_la_list (append (list make_la_name1) adim_la_list))
(setq make_la_name (tblnext "LAYER"))
)
(setq adim_la_list (reverse adim_la_list))
(setq dcl_id (load_dialog "adset.DCL"))
(if (not (new_dialog "adimset" dcl_id))
(exit)
)
(setq key-add "adim-la"
adim_la_add
'()
sel_la_n "0"
sel_la_n_r
"0"
)
(input_clb "all-la" adim_la_list)
(if adim-la-value
(progn
(input_clb "adim-la" adim-la-value)
(setq adim_la_add adim-la-value)
)
)
(if (null dot-value)
(setq dot-value "0")
)
(if (null xx-value)
(setq xx-value "0")
)
(if (null n5-value)
(setq n5-value "1")
)
(if (null mult-ad-value)
(setq mult-ad-value "1")
)
(if (null ins-po-value)
(setq ins-po-value "0")
)
(if (null circen-value)
(setq circen-value "0")
)
(if (null all-line-value)
(setq all-line-value "1")
)
(set_tile "all-la" sel_la_n)
(set_tile "dot" dot-value)
(set_tile "xx" xx-value)
(set_tile "circen" circen-value)
(set_tile "mult-ad" mult-ad-value)
(set_tile "n5" n5-value)
(set_tile "all-line" all-line-value)
(set_tile "ins-po" ins-po-value)
(if (null check-inters-len-value)
(set_tile "check-inters-len" "10")
(set_tile "check-inters-len" check-inters-len-value)
)
(if (null check-inters-len1-value)
(set_tile "check-inters-len1" "1")
(set_tile "check-inters-len1" check-inters-len1-value)
)
(if (= all-line-value "1")
(progn
(mode_tile "add-la" 1)
(mode_tile "remove-la" 1)
(mode_tile "all-la" 1)
(mode_tile "adim-la" 1)
)
)
(mode_tile "xx" 1)
(action_tile "all-la" "(setq sel_la_n $value)")
(action_tile "add-la" "(set_adim_la)")
(action_tile "adim-la" "(setq sel_la_n_r $value)")
(action_tile "remove-la" "(remove_adim_la)")
(action_tile "n5" "(setq n5-value (get-sel-value))")
(action_tile "xx" "(setq xx-value (get-sel-value))")
(action_tile "circen" "(setq circen-value (get-sel-value))")
(action_tile "all-line" "(get-sel-all-line-value))")
(action_tile "ins-po" "(setq ins-po-value (get-sel-value))")
(action_tile "dot" "(setq dot-value (get-sel-value))")
(action_tile
"mult-ad"
"(setq mult-ad-value (get-sel-value))"
)
(action_tile "accept" "(accept-value) (done_dialog)")
(action_tile "cancel" "(cancel-value)")
(start_dialog)
(cond
((= userclick T)
(setvar "osmode" 0)
(setq adim-la-value adim_la_add
ssget-list nil
)
(setq corner-po1 (getpoint "\n选择标注范围:"))
(if corner-po1
(setq corner-po2 (getcorner corner-po1))
)
(setvar "osmode" 45)
(if (and (= all-line-value "0") (> (length adim-la-value) 0))
(progn
(setq make-ssget-i 0)
(while (< make-ssget-i (length adim-la-value))
(setq ssget-list1
(ssget
"c"
corner-po1
corner-po2
(list
(cons 8
(nth make-ssget-i adim-la-value)
)
(cons 0 "LINE")
)
)
)
(if ssget-list1
(setq i (sslength ssget-list1))
(setq i 0)
)
(while (> i 0)
(setq i (- i 1))
(if (null ssget-list)
(setq ssget-list (ssadd (ssname ssget-list1 i)))
(setq ssget-list
(ssadd (ssname ssget-list1 i)
ssget-list
)
)
)
)
(setq make-ssget-i (+ make-ssget-i 1))
)
(setq ss ssget-list
ssget-list nil
)
)
)
(if (and (= all-line-value "1") (= (length adim-la-value) 0))
(setq ss (ssget "c" corner-po1 corner-po2 '((0 . "LINE"))))
)
(if (= dot-value "1")
(progn
(setq ssget-list1
(ssget "c"
corner-po1
corner-po2
(list (cons 0 "POINT"))
)
)
(if ssget-list1
(setq i (sslength ssget-list1))
(setq i 0)
)
(while (> i 0)
(setq i (- i 1))
(if (null ssget-list)
(setq ssget-list (ssadd (ssname ssget-list1 i)))
(setq ssget-list
(ssadd (ssname ssget-list1 i) ssget-list)
)
)
)
(setq sso ssget-list)
)
)
(if (= ins-po-value "1")
(progn
(setq ssget-list1
(ssget "c"
corner-po1
corner-po2
(list (cons 0 "INSERT"))
)
)
(if ssget-list1
(setq i (sslength ssget-list1))
(setq i 0)
)
(while (> i 0)
(setq i (- i 1))
(if (null ssget-list)
(setq ssget-list (ssadd (ssname ssget-list1 i)))
(setq ssget-list
(ssadd (ssname ssget-list1 i) ssget-list)
)
)
)
(setq sso ssget-list)
)
)
(if (= circen-value "1")
(progn
(setq ssget-list1
(ssget "c"
corner-po1
corner-po2
(list (cons -4 "<OR")
(cons 0 "CIRCLE")
(cons 0 "ARC")
(cons -4 "OR>")
)
)
)
(if ssget-list1
(setq i (sslength ssget-list1))
(setq i 0)
)
(while (> i 0)
(setq i (- i 1))
(if (null ssget-list)
(setq ssget-list (ssadd (ssname ssget-list1 i)))
(setq ssget-list
(ssadd (ssname ssget-list1 i) ssget-list)
)
)
)
(setq sso ssget-list)
)
)
)
((= userclick nil)
(setq adim-la-value
nil
n5-value "1"
mult-ad-value
"1"
dot-value "0"
xx-value "0"
ins-po-value
"0"
circen-value
"0"
all-line-value
"1"
)
(setvar "osmode" 0)
(setq corner-po1 (getpoint "\n选择标注范围:"))
(if corner-po1
(setq corner-po2 (getcorner corner-po1))
)
(setvar "osmode" 45)
(setq ss (ssget "c" corner-po1 corner-po2 '((0 . "LINE"))))
)
)
(setq cen (getpoint "\n 请选择原点:"))
(if cen
(progn
(prompt "\n请稍等")
(setvar "osmode" 0)
(vl-cmdf "_.zoom"
"c"
cen
(abs (- (nth 1 corner-po1) (nth 1 corner-po2)))
)
(vl-cmdf "_.ucs" "o" cen)
(setq commandlist '())
(if (or ss sso)
(ss_ssxx)
)
(if ssy
(draw_ssy)
)
(if ssx
(draw_ssx)
)
(if ssoo
(draw_ssoo)
)
(if ss1
(vl-cmdf "_.change"
ss1
""
"p"
"la"
(nth 9 lcad_set_layer_list)
""
)
)
)
)
(prompt "\n*LCAD 自动坐标标注完成*")
(princ)
)
作者:
sayit
时间:
2009-12-26 11:58
adimset:dialog{
label = "LCAD自动尺寸标注设置";
:boxed_row{
label = "选择自动标注设置";
:list_box{
label = "层列表";
key = "all-la";
width = 15;
height = 15;
}
:column{
spacer;
spacer;
:button{
label = ">>";
key = "add-la";
}
:button{
label = "<<";
key = "remove-la";
}
spacer;
spacer;
}
:list_box{
label = "自动标注层";
key = "adim-la";
width = 15;
height = 15;
}
:boxed_column{
label = "其它选择";
spacer;
:toggle{
label = "所有直线";
key = "all-line";
}
:toggle{
label = "圆心";
key = "circen";
}
:toggle{
label = "插入点";
key = "ins-po";
}
:toggle{
label = "斜线";
key = "xx";
}
:toggle{
label = "点";
key = "dot";
}
:toggle{
label = "5 * n";
key = "n5";
value = 1;
}
:toggle{
label = "允许重复标注";
key = "mult-ad";
value = 1;
}
:boxed_column{
label = "判定干涉(N*L)";
:row{
:text{
label = "步数N";
}
:text{
label = "*";
}
:text{
label = "步长L";
}
}
:row{
:edit_box{
key = "check-inters-len";
width = 2;
}
:edit_box{
key = "check-inters-len1";
width = 2;
}
}
}
spacer;
}
}
:row{
spacer;
:button{
label = "自定义设置标注";
is_default = true;
key = "accept";
width = 6;
fixed_width = true;
}
: button { // 定义“Cancel”按钮
label = "默认设置标注";
is_cancel = true;
key = "cancel";
width = 6;
fixed_width = true;
}
spacer;
}
}
作者:
sayit
时间:
2009-12-26 12:06
自己编的,使用中,可以自动判断尺寸和线条的干涉
坐标标注
作者:
paheng
时间:
2009-12-26 20:04
不错的思路,以前都没有想过这个问题.
作者:
joanring
时间:
2010-1-7 14:20
是所谓的坐标标注吗?
我有...
作者:
kingfu
时间:
2010-1-7 22:38
燕秀不错。。
作者:
chxianok
时间:
2010-2-22 14:17
先下载下来用用
作者:
wangzheming
时间:
2010-2-25 20:52
网上收缩吧,很多的
作者:
mohan816
时间:
2010-2-25 23:01
有免费的吗
作者:
xxywxtk
时间:
2010-3-23 09:53
有没有可以自动识别里面的方孔和圆孔直径的呀
太需要了
作者:
sayit
时间:
2010-3-26 13:00
https://www.icax.org/461948p2p1
有孔的自动计数标注,自动坐标标注
件号球绘制,明细表制作
作者:
578749467
时间:
2010-10-30 13:18
支持提供源码
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3