本帖最后由 自贡黄明儒 于 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)
- )
|