新建标注样式"TSSD_100_100"
(defun ddstyle ( / sc)
(setq sc 1)
(setq sc (cdr (assoc 18 Data))) 绘图比例
(setvar "cmdecho" 0)
(setvar "dimclrd" 0) 为尺寸线、箭头和标注引线指定颜色
(setvar "dimclre" 0) 为尺寸界线指定颜色
(setvar "dimclrt" acwhite) 为标注文字指定颜色
(setvar "dimdle" (* sc 100)) 当使用小斜线代替箭头进行标注时,设置尺寸线超出尺寸界线的距离(超出标记)
(setvar "dimexe" (* sc 100)) 指定尺寸界线超出尺寸线的距离
(setvar "dimexo" (* sc 250)) 起点偏移量
(setvar "dimblk" "_ARCHTICK") 箭头(建筑标记)
(setvar "dimasz" (* sc 100)) 控制尺寸线和引线箭头的大小。并控制基线的大小
(setvar "dimcen" 0) 圆心标记-无
(setvar "dimarcsym" 0) 弧长符号-前辍
(setvar "dimjogang" (* sc 45)) 折弯角度
(setvar "dimtxsty" "TSSD_Dimension") 指定标注的文字样式
(setvar "dimtxt" (* sc 300)) 指定标注文字的高度
(setvar "dimtad" 1) 文字垂直位置(上方)
(setvar "dimjust" 0) 文字水平位置(居中)
(setvar "dimtih" "off") 线内文字对齐(与尺寸线对齐)
(setvar "dimtoh" "off") 线外文字对齐(与尺寸线对齐)
(setvar "dimgap" (* sc 100)) 文字从尺寸线偏移
(setvar "dimtix" "on") 文字始终保持在尺寸界线之间
(setvar "dimtmove" 2) 文字不在默认位置时,放在 尺寸线上方,不加引线
(setvar "dimscale" 1) 全局比例
(setvar "dimtofl" "on") 在尺寸线之间绘制尺寸界线
(setvar "dimdec" 0) 精度
(setvar "dimlfac" 1) 测量比例因子
(command "-dimstyle" "S" "TSSD_100_100" "" "")建立标注样式
)
(defun c:cc()(setq cm (getvar "cmdecho")
os (getvar "osmode")
)
(setvar "cmdecho" 0)
(setvar "osmode"0 )
(command "_undo" "be")
(while (setq p3 (getpoint "\n指定引线起点<回车结束>:"))
(if (setq p2 (getpoint p3 "\n指定第二点:"))
(if (setq p1 (getpoint p2 "\n指定第三点:"))
(progn
(setq dx (- (car p2) (car p1))
ang (cond ((>dx 0.0) pi )
(t 0.0)
)
pp1 (polar p2 ang (distance p2 p1))
)
(command "_leader" p3 p2 pp1 "" "" "n")
)
)
)
)
(command "_undo" "e")
(setvar "osmode" cm)
(setvar "cmdecho" cm)
(princ)
)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)