修改标注尺寸精度
本帖最后由 自贡黄明儒 于 2022-11-17 11:17 编辑修改标注尺寸精度,桌子很方便的,指向尺寸弹右键。B版的PCCAD,是bricscad内核,修改精度就不方便了,只能trl+1
于是。。。
HH:rtosr1
;;5 修改标注尺寸精度(setq dec 2)
(defun DimensionDEC (DEC / E M N OBJ SS TEXTOVERRIDE)
(princ "\n 选择尺寸,其标注样式精度将改变!")
(while (setq ss (ssget "_+.:E:S" '((0 . "*DIMENSION*"))))
(repeat (setq n (sslength ss))
(setq e (ssname ss (setq n (1- n))))
(setq obj (vlax-ename->vla-object e))
(VL-CATCH-ALL-ERROR-P
(VL-CATCH-ALL-APPLY
'vlax-put
(list obj 'PrimaryUnitsPrecision DEC)
)
)
(VL-CATCH-ALL-APPLY 'vlax-put (list obj 'TextPrecision DEC))
(setq M (vlax-get obj 'Measurement))
(setq TextOverride (vlax-get obj 'TextOverride))
(if (and (/= TextOverride "")
(not (wcmatch TextOverride "*<>*"))
)
(if (distof TextOverride)
(VL-CATCH-ALL-APPLY
'vlax-put
(list obj
'TextOverride
(HH:rtosr1 (distof TextOverride) DEC)
)
)
)
(VL-CATCH-ALL-APPLY
'vlax-put
(list obj 'TolerancePrecision DEC)
)
)
)
)
(princ)
)
好功能。要是能加个快捷命令,先输入数值精度再选择(框选)标注就更方便了 很好的程序,建议写成实用点的,以利我们这些小白:lol 很好!学习了! 感谢楼主分享
页:
[1]