Specifies the active profile for the AutoCAD session.
Supported platforms: AutoCAD for Windows only; not supported in AutoCAD LT for Windows
VBA:
object.ActiveProfile
Type: PreferencesProfiles
The object this property applies to.
Read-only: No
Type: String
The name of the active profile.
No additional remarks.
VBA:
Sub Example_ActiveProfile()
' This example returns the current setting of
' ActiveProfile.
Dim preferences As AcadPreferences
Dim currActiveProfile As String
Set preferences = ThisDrawing.Application.preferences
' Retrieve the current ActiveProfile value
currActiveProfile = preferences.Profiles.ActiveProfile
MsgBox "The current value for ActiveProfile is " & currActiveProfile, vbInformation, "ActiveProfile Example"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_ActiveProfile()
;; This example returns the current setting of
;; ActiveProfile.
(setq acadObj (vlax-get-acad-object)
preferences (vla-get-Preferences acadObj))
;; Retrieve the current ActiveProfile value
(setq currActiveProfile (vla-get-ActiveProfile (vla-get-Profiles preferences)))
(alert (strcat "The current value for ActiveProfile is " currActiveProfile))
)