Resets the value in the specified profile to its default values.
Supported platforms: AutoCAD for Windows only; not supported in AutoCAD LT for Windows
VBA:
object.ResetProfile Profile
Type: PreferencesProfiles
The object this method applies to.
Access: Input-only
Type: String
The profile to reset.
No return value.
The specified profile must be the current active profile. To set a profile as the current active profile, use the ActiveProfile property.
VBA:
Sub Example_ResetProfile()
' This example resets a profile to the default values.
' NOTE: A dummy profile name is used so that your existing
' profiles are not changed.
Dim preferences As AcadPreferences
Dim strProfileToReset As String
Set preferences = ThisDrawing.Application.preferences
' Specify the profile to delete.
strProfileToReset = "TestProfile"
' Delete the profile
' The call will fail if "TestProfile" does not exist
On Error GoTo Error
preferences.Profiles.ResetProfile strProfileToReset
Exit Sub
Error:
MsgBox "ResetProfile of " & strProfileToReset & " failed. " & Err.Description, , "ResetProfile Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_ResetProfile()
;; This example resets a profile to the default values.
;; NOTE: A dummy profile name is used so that your existing
;; profiles are not changed.
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; Specify the profile to delete.
(setq strProfileToReset "TestProfile")
;; Reset the profile
;; The call will fail if "TestProfile" does not exist
(setq err (vl-catch-all-apply 'vla-ResetProfile (list (vla-get-Profiles preferences) strProfileToReset)))
(if (= (type err) 'VL-CATCH-ALL-APPLY-ERROR)
(alert (strcat "ResetProfile of " strProfileToReset " failed. "))
(alert (strcat "We have just reset the profile " strProfileToReset))
)
)