「Vla-put-tempfilepath」の版間の差分
(ページの作成:「{{AutoLISP}} ; 構文 : (vla-put-tempfilepath ''vla-object'' ''path'') ; 機能 : CAD がテンポラリ ファイルの格納に使用するフォルダを指定する...」) |
細編集の要約なし |
||
| 6行目: | 6行目: | ||
; 機能 | ; 機能 | ||
: CAD がテンポラリ ファイルの格納に使用するフォルダを指定する。 | : CAD がテンポラリ ファイルの格納に使用するフォルダを指定する。 | ||
; 引数 | ; 引数 | ||
| 15行目: | 16行目: | ||
: nil | : nil | ||
; サンプル | ; サンプル | ||
2015年1月12日 (月) 01:20時点における最新版
- 構文
- (vla-put-tempfilepath vla-object path)
- 機能
- CAD がテンポラリ ファイルの格納に使用するフォルダを指定する。
- 引数
-
- vla-object … PreferencesFilesのVLAオブジェクト
- path … パスの文字列
- 戻り値
- nil
- サンプル
(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))
)
関連事項