Vla-put-tempfilepath

提供:GizmoLabs - だいたい CAD LISP なサイト
構文
(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))
)

関連事項