「Vla-get-tempfilepath」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (vla-get-tempfilepath ''vla-object'') ; 機能 : CAD がテンポラリ ファイルの格納に使用するフォルダを取得する。 ; ...」) |
(相違点なし)
|
2015年1月12日 (月) 01:23時点における最新版
- 構文
- (vla-get-tempfilepath vla-object)
- 機能
- CAD がテンポラリ ファイルの格納に使用するフォルダを取得する。
- 引数
-
- vla-object … PreferencesFilesのVLAオブジェクト
- 戻り値
- パスの文字列
- サンプル
(vl-load-com)
(defun c:Example_TempFilePath()
;; テンポラリ ファイルのフォルダを取得・変更するサンプル。
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; 元のパス
(setq currTempFilePath (vla-get-TempFilePath (vla-get-Files preferences)))
(alert (strcat "元の TempFilePath は " currTempFilePath))
;; 新しい TempFilePath
(setq newTempFilePath "C:\\CAD\\")
(vla-put-TempFilePath (vla-get-Files preferences) newTempFilePath)
(alert (strcat "新しい TempFilePath は " newTempFilePath))
;; TempFilePath のリセット
(vla-put-TempFilePath (vla-get-Files preferences) currTempFilePath)
(alert (strcat "TempFilePath のリセット " currTempFilePath))
)
関連事項