linshiyin2
发表于 2014-3-13 19:17:35
panliang9
发表于 2014-3-14 10:47:20
好东西,收藏了!
jsh2939
发表于 2014-3-14 10:59:06
不能用啊 !!!!!
瀛州流水
发表于 2014-3-14 12:46:09
出现错误: *error* 函数中出错无函数定义: _ENDUNDO
726613
发表于 2014-3-15 17:05:44
自贡黄明儒 发表于 2014-3-12 15:34 static/image/common/back.gif
本来想放在二楼的,现在只能放在这儿了!!
谢谢楼主分享
s678z
发表于 2014-3-17 13:31:22
对话框设置后没反应
jsh2939
发表于 2014-3-22 17:53:39
能不能传个完整的东西!!!!!!!!!!!
669423907
发表于 2014-3-28 09:32:56
非常感谢黄大师分享好程序!
提一点小建议:
可以用鼠标点取文字作为序号的字高(默认当前自高)就更完美了!
上传一个Z版的
;球标标注 ZZXXQQ 2011-10 http://bbs.mjtd.com/thread-84161-3-1.html
(defun c:qqqq(/ os oldlayer pt num ppoint angleline texthight LINEL)
(setq la (getvar"clayer"))
(command "layer" "m" "7标注" "c" "3" "" "lw" "0.13" "" "l" "Continuous" "" "")
; (setvar "CMDECHO" 0)
; (setvar "ORTHOMODE" 1)
(setq os (getvar "osmode"))
(setq ort (getvar "ORTHOMODE"))
(setq oldlayer (getvar "CLAYER"))
(command "_.undo" "be")
(setvar "osmode" 6079)
(if (and (setq s1 (entsel "\n选择文本 :"))
(setq ent (entget(car s1)))
(= (cdr(assoc 0 ent)) "TEXT"))
(setq texthight (cdr(assoc 40 ent)))
(setq texthight (getvar 'textsize))
)
(if (and (setq numx (getint "\n起始序号<1>") numx (if numx numx 1))
(setq pt (getpoint "\n指定球标位置 :"))) (progn
;(setvar "ORTHOMODE" 0)
(setq ppoint (getpoint pt "\n标示构件点 :"))
;(setvar "ORTHOMODE" 1)
(setq angleline (angle ppoint pt))
(setq LINEL (- (distance PPOINT PT) (* 1.0 texthight)))
(setq num (rtos numx 2 0))
;(command "LAYER" "M" "文本" "")
(command "mtext" pt "J" "MC" "H" texthight "w" 8 NUM "")
;(command "LAYER" "M" "粗实线" "")
(command "CIRCLE" PT (* 1 texthight))
;(command "LAYER" "M" "标注" "")
(command "donut" 0 "0.5" ppoint "")
(command "LINE" (polar PPOINT angleline 0.25) (polar PPOINT angleline LINEL) "")
))
(if pt
(while (setq nextpoint (getpoint pt "\n下一个球标位置 :"))
(if (< (abs (- (car nextpoint) (car pt))) (abs (- (cadr nextpoint) (cadr pt))))
(setq ptx (list (car pt) (cadr nextpoint)))
(setq ptx (list (car nextpoint) (cadr pt)))
)
(if (equal (distance ptx pt) (* 2 texthight) texthight)
(setq ptx (polar pt (angle pt ptx) (* 2 texthight)))
)
(setq NUMx (1+ NUMx))
(setq num (rtos numx 2 0))
;(setvar "CLAYER" "文本")
(command "mtext" ptX "J" "MC" "H" texthight "w" 8 NUM "")
;(setvar "CLAYER" "粗实线")
(command "CIRCLE" PTX (* 1 texthight))
(if (not (equal (distance ptx pt) (* 2 texthight) texthight)) (progn
; (setvar "ORTHOMODE" 0)
(setq ppoint (getpoint ptx "\n标示构件点 :"))
; (setvar "ORTHOMODE" 1)
; (setvar "CLAYER" "标注")
(command "donut" 0 "0.5" ppoint "")
(setq angleline (angle ppoint ptX))
(setq LINEL (- (DISTance PPOINT PTX) (* 1.0 texthight)))
(command "LINE" (polar PPOINT angleline 0.25) (polar PPOINT angleline LINEL) "")))
(setq pt ptx)))
(setvar "clayer"la)
(command "_.undo" "e")
(setvar "ORTHOMODE" ort)
(setvar "osmode" os)
(setvar "CMDECHO" 1)
(princ))
yoyoho
发表于 2014-4-30 08:21:58
非常感谢黄老师分享好程序!
cabinsummer
发表于 2014-5-1 12:06:02
很好很简单