Specifies the directory in which AutoCAD searches for rendering texture maps.
Supported platforms: Windows only
VBA:
object.TextureMapPath
Type: PreferencesFiles
The object this property applies to.
Read-only: No
Type: String
The location of the directory for rendering texture maps.
Multiple paths can be entered by using a semicolon (;) to paths.
VBA:
Sub Example_TextureMapPath() ' This example returns the current setting of ' TextureMapPath. It then changes the value, and finally ' it resets the value back to the original setting. Dim preferences As AcadPreferences Dim currTextureMapPath As String Dim newTextureMapPath As String Set preferences = ThisDrawing.Application.Preferences ' Retrieve the current TextureMapPath value currTextureMapPath = preferences.Files.TextureMapPath MsgBox "The current value for TextureMapPath is " & currTextureMapPath, vbInformation, "TextureMapPath Example" ' Change the value for TextureMapPath newTextureMapPath = "TestTextureMapPath" preferences.Files.TextureMapPath = newTextureMapPath MsgBox "The new value for TextureMapPath is " & newTextureMapPath, vbInformation, "TextureMapPath Example" ' Reset TextureMapPath to its original value preferences.Files.TextureMapPath = currTextureMapPath MsgBox "The TextureMapPath value is reset to " & currTextureMapPath, vbInformation, "TextureMapPath Example" End Sub
Visual LISP:
(vl-load-com) (defun c:Example_TextureMapPath() ;; This example returns the current setting of ;; TextureMapPath. 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 TextureMapPath value (setq currTextureMapPath (vla-get-TextureMapPath (vla-get-Files preferences))) (alert (strcat "The current value for TextureMapPath is " currTextureMapPath)) ;; Change the value for TextureMapPath (setq newTextureMapPath "TestTextureMapPath") (vla-put-TextureMapPath (vla-get-Files preferences) newTextureMapPath) (alert (strcat "The new value for TextureMapPath is " newTextureMapPath)) ;; Reset TextureMapPath to its original value (vla-put-TextureMapPath (vla-get-Files preferences) currTextureMapPath) (alert (strcat "The TextureMapPath value is reset to " currTextureMapPath)) )