Imports a profile created by another user.
Supported platforms: AutoCAD for Windows only; not supported in AutoCAD LT for Windows
VBA:
object.ImportProfile Profile, RegFile, IncludePathInfo
Type: PreferencesProfiles
The object this method applies to.
Access: Input-only
Type: String
The name of the profile to import.
Access: Input-only
Type: String
The registry file that the profile should be imported from. The file should have an .arg extension.
Access: Input-only
Type: Boolean
No return value.
No additional remarks.
VBA:
Sub Example_ImportProfile()
' This example imports a profile.
' NOTE: A dummy profile name is used so that your existing
' profiles are not changed.
Dim preferences As AcadPreferences
Dim strProfileToImport As String
Set preferences = ThisDrawing.Application.preferences
' Specify the profile to delete.
strProfileToImport = "TestProfile"
' Delete the profile
' The call will fail if "TestProfile" does not exist
On Error GoTo Error
preferences.Profiles.ImportProfile strProfileToImport, "TESTPROFILE.ARG", True
Exit Sub
Error:
MsgBox "ImportProfile of " & strProfileToImport & " failed. " & Err.Description, , "ImportProfile Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_ImportProfile()
;; This example imports a profile.
;; 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 import.
(setq strProfileToImport "TestProfile")
(vla-ImportProfile (vla-get-Profiles preferences) strProfileToImport (findfile "TESTPROFILE.ARG") :vlax-true)
)