TempXRefPath プロパティ(ActiveX)

外部参照ファイルの位置を指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.TempXRefPath
object

タイプ: PreferencesFiles

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: 文字列

外部参照ファイルを検索するフォルダのドライブとパス

注意

この位置は、XRefDemandLoad プロパティで acEnableWithCopy ディマンド ロードを選択した場合、外部参照のコピーに使われます。

VBA:

Sub Example_TempXRefPath()
    ' This example returns the current setting of
    ' TempXRefPath. It then changes the value, and finally
    ' it resets the value back to the original setting.
    
    Dim preferences As AcadPreferences
    Dim currTempXRefPath As String
    Dim newTempXRefPath As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current TempXRefPath value
    currTempXRefPath = preferences.Files.TempXrefPath
    MsgBox "The current value for TempXRefPath is " & currTempXRefPath, vbInformation, "TempXRefPath Example"
    
    ' Change the value for TempXRefPath
    newTempXRefPath = "TestTempXRefPath"
    preferences.Files.TempXrefPath = newTempXRefPath
    MsgBox "The new value for TempXRefPath is " & newTempXRefPath, vbInformation, "TempXRefPath Example"
    
    ' Reset TempXRefPath to its original value
    preferences.Files.TempXrefPath = currTempXRefPath
    MsgBox "The TempXRefPath value is reset to " & currTempXRefPath, vbInformation, "TempXRefPath Example"
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_TempXRefPath()
    ;; This example returns the current setting of
    ;; TempXRefPath. It then changes the value, and finally
    ;; it resets the value back to the original setting.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
    
    ;; Retrieve the current TempXRefPath value
    (setq currTempXRefPath (vla-get-TempXrefPath (vla-get-Files preferences)))
    (alert (strcat "The current value for TempXRefPath is " currTempXRefPath))
    
    ;; Change the value for TempXRefPath
    (setq newTempXRefPath "TestTempXRefPath")
    (vla-put-TempXrefPath (vla-get-Files preferences) newTempXRefPath)
    (alert (strcat "The new value for TempXRefPath is " newTempXRefPath))
    
    ;; Reset TempXRefPath to its original value
    (vla-put-TempXrefPath (vla-get-Files preferences) currTempXRefPath)
    (alert (strcat "The TempXRefPath value is reset to " currTempXRefPath))
)