csharp 发表于 2017-3-11 14:44:25

标注和显示公差标注的区分

Dimension 有一个 ToleranceDisplay Property , 这个属性可以获得/设置标注文字是否使用 公差

Specifies if tolerances are displayed with the dimension text.



object.ToleranceDisplay

object   Dim3PointAngular, DimAligned, DimAngular, DimArcLength, DimDiametric, DimOrdinate, DimRadial, DimRadialLarge, DimRotated
The object or objects this property applies to.

ToleranceDisplay

acDimToleranceMethod enum; read-write

   acTolNone= 0
   acTolSymmetrical
   acTolDeviation
   acTolLimits
   acTolBasic

System variables

This property overrides the value of the DIMTOL system variable for the given dimension.

Remarks

The initial value for this property is acTolNone.

用 Vlisp 筛选

(defun c:tt (/ ss sl s obj e)
(if (setq ss (ssget '((0 . "DIM*"))))
    (progn
      (setq sl (sslength ss)
          s(ssadd)
      )
      (while (and (setq e (ssname ss (setq sl (1- sl))))
                  (setq obj (vlax-ename->vla-object e))
             )
        (if (> (vla-get-ToleranceDisplay obj) 0)
          (ssadd e s)
        )
      )
      (if (> (sslength s) 0)
        (sssetfirst nil s)
      )
    )
)
(princ)
)

330774521lhq 发表于 2017-3-11 16:56:29

啥也不说了,感谢楼主分享哇!

lucas3 发表于 2017-3-11 22:05:40

大师,Free-Lancer也是您的号吧,现在不用呢?

1028882406@qq.c 发表于 2017-3-11 22:24:27

啥也不说了,感谢楼主分享哇!

alliuyx 发表于 2017-3-12 09:24:04

正需要,支持楼主大人了!

kqqt6236 发表于 2017-3-13 00:07:54

啥也不说了,感谢楼主分享哇!
页: [1]
查看完整版本: 标注和显示公差标注的区分