ImportProfile Example

Using Programming Languages other than 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





   Comments?