测量距离的插件
有没有那种测量距离的插件,可以显示距离长度的那种命令: dist
指定第一点:指定第二点:
距离 = 77.5275,XY 平面中的倾角 = 30,与 XY 平面的夹角 = 0
X 增量 = 67.4007,Y 增量 = 38.3102, Z 增量 = 0.0000
CAD 自带命令 ;*****************************按图层标注边长*******************************************
(DEFUN C:bc ()
(setvar "cmdecho" 0)
(COMMAND "-osnap" "")
(COMMAND "-layer" "s" "0" "")
(setq TUCHENG (getstring "\n 请输入要注记的图层< 建筑 > : "))
(if (or (= TUCHENG nil) (= TUCHENG ""))
(setq TUCHENG "建筑")
)
(setq hei (getreal "\n 输入字高 < 1> :"))
(if (= hei nil)
(setq hei 1)
)
(setq zjws (getint "\n 输入小数点后保留的位数 < 2 > : "))
(if (or (= zjws nil) (= zjws ""))
(setq zjws 2)
)
(setq BILICHI (getreal "\n 输入图形范围 : "))
(if (= BILICHI nil)
(setq BILICHI 500.0)
)
(command "layer" "make" "中土边长" "c""51" "中土边长" "");
(setq bilixishu (/ BILICHI 1000.0))
(setq zwd1 (getpoint "注记范围第一点"))
(setq zwd5 (getcorner zwd1 "注记范围第五点"))
(setqss (ssget"w" zwd1 zwd5(list (cons 0 "LINE,POLYLINE,LWPOLYLINE") (cons 8 TUCHENG)) ) )
(setq ZCD (sslength ss))
(setq ZXH 0)
(while (< ZXH ZCD)
(setq NE (ssname ss ZXH))
(setq ED (entget NE))
(setq TJ (CDR (assoc 0 ED)))
(if (= TJ "LINE")
(progn
(setq kk2 (cdr (assoc 10 ED)))
(setq kk3 (cdr (assoc 11 ED)))
(setq dis (rtos (distance KK2 KK3) 2 zjws))
(setq an (angle KK2 KK3))
(setq kkm (polar KK2 an (/ (distance KK2 KK3) 2)))
(if (or (< (/ (* 3 pi) 4) an (/ (* 7 pi) 4)) (= an (/ (* 7 pi) 4)))
(COMMAND "text" "J" "BC" kkm hei KK2 dis)
(COMMAND "text" "J" "BC" kkm hei KK3 dis)
)
)
)
(if (= TJ "POLYLINE")
(progn
(setq pdtj (cdr (assoc 70 (entget NE))))
(setq kxy (cdr (assoc 10 (entget (entnext NE)))))
(while (and (setq NE (entnext NE)) (setq ED (entget NE))(/= "SEQEND" (cdr (assoc 0 ED))) )
(setq kk2 (cdr (assoc 10 ED)))
(if (= (setq kk3 (cdr (assoc 10 (entget (entnext NE))))) nil)
(setq kk3 kxy)
)
(setq dis (rtos (* (distance kk2 kk3) bilixishu) 2 zjws))
(setq an (angle kk2 kk3))
(setq kkm (polar kk2 an (/ (distance kk2 kk3) 2)))
(if (or (< (/ (* 3 pi) 4) an (/ (* 7 pi) 4)) (= an (/ (* 7 pi) 4)) )
(COMMAND "text" "J" "C" kkm hei kk2 dis)
(COMMAND "text" "J" "C" kkm hei kk3 dis)
)
)
(setq YUbeishanchu (entlast))
(if (= (LOGAND pdtj 128) 128)
( entdel YUbeishanchu)
)
)
)
(if (= TJ "LWPOLYLINE")
(progn
(setq num (length ED))
(setq i 0)
(setq j 0)
(while (< i num)
(setq ss1 (nth i ED))
(setq ss2 (car ss1))
(if (= ss2 10)
(progn
(if (> j 0)
(progn
(setq ss3 ss4)
(setq ss4 (cdr ss1))
(setq dis (rtos (distance ss3 ss4) 2 zjws))
(setq an (angle ss3 ss4))
(setq kkm (polar ss3 an (/ (distance ss3 ss4) 2)))
(if (or (< (/ (* 3 pi) 4) an (/ (* 7 pi) 4))
(= an (/ (* 7 pi) 4))
)
(COMMAND "text" "J" "BC" kkm hei ss3 dis)
(COMMAND "text" "J" "BC" kkm hei ss4 dis)
)
);progn
(setq ss4 (cdr ss1))
);if
(setq j (+ j 1))
);progn
);if
(setq i (+ i 1))
)
)
)
(setq ZXH (+ ZXH 1))
)
(COMMAND "REDRAW")
) 感觉楼主没有详细表达出自己想要什么?
页:
[1]