Vla-put-tolerancesuppresstrailingzeros
- 構文
- (vla-put-tolerancesuppresstrailingzeros vla-object num)
- 機能
- 寸法許容差値の末尾のゼロの省略を指定する。
- 引数
-
- vla-object … VLAオブジェクト
- num … ブール型
- vlax-True: 十進表記の値の末尾のゼロを省略。たとえば、12.5000 は 12.5 になる。
- vlax-False: 十進表記の値の末尾のゼロを省略しない。
- 戻り値
- nil
- このプロパティの初期値は False です。
- 注 : この値は、システム変数 DIMTZIN[寸法許容差 0 省略]の値を変更する。
- サンプル
(vl-load-com)
(defun c:Example_ToleranceSuppressTrailingZeros()
;; この例では、モデル空間に平行寸法を作成し
;; 寸法公差表示で末尾ゼロの表示を切り替えるサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; 寸法の設定
(setq point1 (vlax-3d-point 5 5 0)
point2 (vlax-3d-point 5.01 5 0)
location (vlax-3d-point 5 7 0))
;; 平行寸法を作成
(setq modelSpace (vla-get-ModelSpace doc))
(setq dimObj (vla-AddDimAligned modelSpace point1 point2 location))
;; 寸法交差を表示
(vla-put-ToleranceDisplay dimObj acTolSymmetrical)
(vla-put-ToleranceLowerLimit dimObj -0.0001)
(vla-put-ToleranceUpperLimit dimObj 0.005)
(vla-ZoomAll acadObj)
;; 交差をトグル
(vla-put-ToleranceSuppressTrailingZeros dimObj (if (= (vla-get-ToleranceSuppressTrailingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "末尾ゼロをトグル。")
;; 末尾ゼロ表示を戻す
(vla-put-ToleranceSuppressTrailingZeros dimObj (if (= (vla-get-ToleranceSuppressTrailingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "元に戻す.")
)
関連事項