ActiveProfile Property (ActiveX)

Specifies the active profile for the AutoCAD session.

Supported platforms: Windows only

Signature

VBA:

object.ActiveProfile
object

Type: PreferencesProfiles

The object this property applies to.

Property Value

Read-only: No

Type: String

The name of the active profile.

Remarks

No additional remarks.

Examples

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