Vla-put-suppressleadingzeros
- 構文
- (vla-put-suppressleadingzeros vla-object bool)
- 機能
- 寸法値の接頭のゼロの省略を指定する。
- 引数
-
- vla-object … VLAオブジェクト(Dim3PointAngular、DimAligned、DimAngular、DimArcLength、DimDiametric、Dimension、DimOrdinate、DimRadial、DimRadialLarge、DimRotated)
- bool … ブール型
- :vlax-True: 十進表記の寸法値の接頭のゼロを省略する。たとえば、0.5000 は .5000 になる。
- :vlax-False: 十進表記の寸法値の接頭のゼロを省略しない。
- 戻り値
- nil
- MEMO : このプロパティの初期値は False。この値は、システム変数 DIMZIN[0 省略表記]の値を変更する。
- サンプル
(vl-load-com)
(defun c:Example_SuppressLeadingZeros()
;; 寸法を作成して、寸法値の接頭のゼロを省略をトグルで変更するサンプル
(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-ZoomAll acadObj)
;; 寸法値の接頭のゼロを省略をトグルで変更
(vla-put-SuppressLeadingZeros dimObj (if (= (vla-get-SuppressLeadingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "寸法値の接頭のゼロを省略をトグルで変更")
;; 戻す
(vla-put-SuppressLeadingZeros dimObj (if (= (vla-get-SuppressLeadingZeros dimObj) :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
(alert "寸法値の接頭のゼロを省略を戻します。")
)
関連事項