「Vla-getallprofilenames」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (vla-getallprofilenames ''vla-object'' ''pNames'') ; 機能 : システムで使用可能なすべてのプロファイルを取得する。 ;...」) |
(相違点なし)
|
2016年1月23日 (土) 20:34時点における最新版
- 構文
- (vla-getallprofilenames vla-object pNames)
- 機能
- システムで使用可能なすべてのプロファイルを取得する。
- 引数
-
- vla-object … PreferencesProfiles の VLAオブジェクト
- pNames … システムで使用可能なプロファイル名のリスト。
- 戻り値
- nil
- サンプル
(vl-load-com)
(defun c:Example_GetAllProfileNames()
;; すべてのプロファイルを取得するサンプル
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; PreferencesProfiles オブジェクトを使用
(setq systemProfiles "")
(vla-GetAllProfileNames (vla-get-Profiles preferences) 'systemProfiles)
;; プロファイルをリスト表示
(setq x 0
msg "")
(while (>= (vlax-safearray-get-u-bound systemProfiles 1) x)
(setq msg (strcat msg (vlax-safearray-get-element systemProfiles x) "\n"))
(setq x (1+ x))
)
(alert msg)
)
関連事項