Gets all available profiles for the system.
Supported platforms: AutoCAD for Windows only; not supported in AutoCAD LT for Windows
VBA:
object.GetAllProfileNames pNames
Type: PreferencesProfiles
The object this method applies to.
Access: Output-only
Type: Variant (array of strings)
The array of available profile names for the system.
No return value.
No additional remarks.
VBA:
Sub Example_GetAllProfileNames()
' This example gets all the profiles available for the system.
Dim systemProfiles As Variant
AcadApplication.Preferences.Profiles.GetAllProfileNames systemProfiles
' List all the profiles for the system
Dim x As Integer
Dim msg As String
msg = ""
For x = LBound(systemProfiles) To UBound(systemProfiles)
msg = msg & systemProfiles(x) & vbCrLf
Next
MsgBox msg, vbInformation, "Available Profiles"
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_GetAllProfileNames()
;; This example gets all the profiles available for the system.
(setq acadObj (vlax-get-acad-object))
(setq preferences (vla-get-Preferences acadObj))
;; Use the PreferencesProfiles object
(setq systemProfiles "")
(vla-GetAllProfileNames (vla-get-Profiles preferences) 'systemProfiles)
;; List all the profiles for the system
(setq x 0
msg "")
(while (>= (vlax-safearray-get-u-bound systemProfiles 1) x)
(setq msg (strcat msg (vlax-safearray-get-element systemProfiles x) "\n"))
(setq x (1+ x))
)
(alert msg)
)