Vla-put-suppresstrailingzeros
- 構文
- (vla-put-suppresstrailingzeros vla-object bool)
- 機能
- 寸法許容差値の末尾のゼロの省略を指定する。
- 引数
-
- vla-object … VLAオブジェクト(Dim3PointAngular、DimAligned、DimAngular、DimArcLength、DimDiametric、Dimension、DimOrdinate、DimRadial、DimRadialLarge、DimRotated)
- bool … ブール型
- :vlax-True: 十進表記の寸法値の末尾のゼロを省略する。たとえば、12.5000 は 12.5 になる。
- :vlax-False: 十進表記の寸法の末尾のゼロを省略しない。
- 戻り値
- nil
- MEMO : このプロパティの初期値は False。
- この値は、システム変数 DIMZIN[0 省略表記]の値を変更する。
- サンプル
(vl-load-com)
(defun c:Example_SuppressTrailingZeros()
;; 寸法を作成して、寸法許容差値の末尾のゼロの省略設定を変更するサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; 寸法の定義
(setq point1 (vlax-3d-point 5 5 0)
point2 (vlax-3d-point 7 5 0)
location (vlax-3d-point 5 7 0))
;; 寸法を作成
(setq modelSpace (vla-get-ModelSpace doc))
(setq dimObj (vla-AddDimAligned modelSpace point1 point2 location))
(vla-ZoomAll acadObj)
;; 寸法許容差値の末尾のゼロの省略の設定をトグルで変更
(vla-put-SuppressTrailingZeros dimObj (if (= (vla-get-SuppressTrailingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "寸法許容差値の末尾のゼロの省略をトグルで変更.")
;; 戻す
(vla-put-SuppressTrailingZeros dimObj (if (= (vla-get-SuppressTrailingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "寸法許容差値の末尾のゼロの省略の設定を戻しました。")
)
関連事項