ImportProfile Method (ActiveX)

Imports a profile created by another user.

Supported platforms: Windows only

Signature

VBA:

object.ImportProfile Profile, RegFile, IncludePathInfo
object

Type: PreferencesProfiles

The object this method applies to.

Profile

Access: Input-only

Type: String

The name of the profile to import.

RegFile

Access: Input-only

Type: String

The registry file that the profile should be imported from. The file should have an .arg extension.

IncludePathInfo

Access: Input-only

Type: Boolean

  • True: The path information in the registry file will be preserved.
  • False: The path information in the registry file will not be preserved.

Return Value (RetVal)

No return value.

Remarks

No additional remarks.

Examples

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)
)