Specifies the default Internet address.
Supported platforms: Windows only
VBA:
object.DefaultInternetURL
Type: PreferencesFiles
The object this property applies to.
Read-only: No
Type: String
The default Internet address.
VBA:
Sub Example_DefaultInternetURL()
' This example returns the current setting of
' DefaultInternetURL. It then changes the value, and finally
' it resets the value back to the original setting.
Dim preferences As AcadPreferences
Dim currDefaultInternetURL As String
Dim newDefaultInternetURL As String
Set preferences = ThisDrawing.Application.preferences
' Retrieve the current DefaultInternetURL value
currDefaultInternetURL = preferences.Files.DefaultInternetURL
MsgBox "The current value for DefaultInternetURL is " & currDefaultInternetURL, vbInformation, "DefaultInternetURL Example"
' Change the value for DefaultInternetURL
newDefaultInternetURL = "TestDefaultInternetURL"
preferences.Files.DefaultInternetURL = newDefaultInternetURL
MsgBox "The new value for DefaultInternetURL is " & newDefaultInternetURL, vbInformation, "DefaultInternetURL Example"
' Reset DefaultInternetURL to its original value
preferences.Files.DefaultInternetURL = currDefaultInternetURL
MsgBox "The DefaultInternetURL value is reset to " & currDefaultInternetURL, vbInformation, "DefaultInternetURL Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_DefaultInternetURL()
;; This example returns the current setting of
;; DefaultInternetURL. 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 DefaultInternetURL value
(setq currDefaultInternetURL (vla-get-DefaultInternetURL (vla-get-Files preferences)))
(alert (strcat "The current value for DefaultInternetURL is " currDefaultInternetURL))
;; Change the value for DefaultInternetURL
(setq newDefaultInternetURL "TestDefaultInternetURL")
(vla-put-DefaultInternetURL (vla-get-Files preferences) newDefaultInternetURL)
(alert (strcat "The new value for DefaultInternetURL is " newDefaultInternetURL))
;; Reset DefaultInternetURL to its original value
(vla-put-DefaultInternetURL (vla-get-Files preferences) currDefaultInternetURL)
(alert (strcat "The DefaultInternetURL value is reset to " currDefaultInternetURL))
)