获取系统的所有可用配置文件。 支持的平台:仅窗口 签名工 务 局: object.GetAllProfileNames pNames
返回值(RetVal)无返回值。 言论没有额外的评论。 例子工 务 局: 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) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:42
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.