Vla-put-altsuppresszeroinches
- 構文
- (vla-put-altsuppresszeroinches vla-object bool )
- 機能
- 変換単位寸法値の 0 インチ計測値の省略を指定する。
- 引数
-
- vla-object … VLAオブジェクト(DimAligned、DimArcLength、DimDiametric、DimOrdinate、DimRadial、DimRadialLarge、DimRotated)
- bool … ブール型
- :vlax-True : 0 インチの寸法表示を省略する。
- :vlax-False : 0 インチの寸法表示を省略しない。
- 戻り値
- nil
- サンプル
(vl-load-com)
(defun c:Example_AltSuppressZero-Feet-inche()
;; モデル空間で平行寸法を作成し、変換単位の
;; 0 フィートと 0 インチの表示を切り替えるサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
;; 寸法定義
(setq point1 (vlax-3d-point 0 5 0)
point2 (vlax-3d-point 5 5 0)
location (vlax-3d-point 5 7 0))
;; 寸法を作成
(setq modelSpace (vla-get-ModelSpace doc))
(setq dimObj (vla-AddDimAligned modelSpace point1 point2 location))
;; 変換単位を表示
(setq originalValue_feet (vla-get-AltSuppressZeroFeet dimObj))
(setq originalValue_inch (vla-get-altsuppresszeroinches dimObj))
(vla-put-AltUnits dimObj :vlax-true)
;; 変換単位の倍率を変更
(vla-put-AltUnitsFormat dimObj acDimLArchitectural)
(vla-put-AltUnitsScale dimObj 2) ;; 2 の倍数にする代替単位スケールを設定します。
(vla-ZoomAll acadObj)
(vla-Regen doc acAllViewports)
(alert "変換単位のゼロ フィートとゼロインチの表示を切り替えます。")
;; 寸法の表示を変更
(vla-put-AltSuppressZeroFeet dimObj (if (= originalValue_feet :vlax-true) :vlax-false :vlax-true))
(setq newValue_feet (vla-get-AltSuppressZeroFeet dimObj))
(vla-put-altsuppresszeroinches dimObj (if (= originalValue_inch :vlax-true) :vlax-false :vlax-true))
(setq newValue_inch (vla-get-altsuppresszeroinches dimObj))
(vla-Regen doc acAllViewports)
(alert "変換単位のゼロ フィートとゼロインチの表示を元に戻します。")
(vla-put-AltSuppressZeroFeet dimObj (if (= newValue_feet :vlax-true) :vlax-false :vlax-true))
(vla-put-altsuppresszeroinches dimObj (if (= newValue_inch :vlax-true) :vlax-false :vlax-true))
(vla-Regen doc acAllViewports)
)
関連事項