Vla-put-objectsortbyselection
- 構文
- (vla-put-objectsortbyselection vla-object bool )
- 機能
- オブジェクト選択による図面オブジェクトのソートを指定する。
- 引数
-
- vla-object … DatabasePreferences のVLAオブジェクト
- bool … ブール型
- :vlax-True: オブジェクト選択によるソートを有効にする。
- :vlax-False: オブジェクト選択によるソートを無効にする。
- 戻り値
- nil
- MEMO:このプロパティの初期値は False。
- CAD の初期設定では、印刷と PostScript 出力のみソート可能。ソート オプションを追加すると再作図と再描画に要する時間が長くなる。
- 注 : このプロパティの値は、システム変数 SORTENTS に格納される。
- サンプル
(vl-load-com)
(defun c:Example_ObjectSortBySelection()
;; オブジェクト選択による図面オブジェクトのソートを変更するサンプル
(setq acadObj (vlax-get-acad-object))
(setq doc (vla-get-ActiveDocument acadObj))
(setq preferences (vla-get-Preferences doc))
;; 既定値を読み込み
(setq originalValue (vla-get-ObjectSortBySelection preferences))
(alert (strcat "現在の ObjectSortBySelection 値は : " (if (= originalValue :vlax-true) "True" "False")))
;; 変更
(vla-put-ObjectSortBySelection preferences (if (= originalValue :vlax-true) :vlax-false :vlax-true))
(setq newValue (vla-get-ObjectSortBySelection preferences))
(alert (strcat "新しい ObjectSortBySelection 値は : " (if (= newValue :vlax-true) "True" "False")))
;; 戻す
(vla-put-ObjectSortBySelection preferences originalValue)
(alert (strcat "ObjectSortBySelection 値を元に戻します : " (if (= originalValue :vlax-true) "True" "False")))
)
関連事項