ImportProfile 方法 (ActiveX)
导入由其他用户创建的配置文件。 支持的平台:仅限 AutoCAD for Windows;AutoCAD LT for Windows 不支持 签名VBA: object.ImportProfile Profile, RegFile, IncludePathInfo
返回值 (RetVal)无返回值。 言论没有其他评论。 例子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 可视化 LISP: (vl-load-com) (defun c:Example_ImportProfile() ;; This example imports a profile. ;; NOTE: A dummy profile name is used so that your existing ;; profiles are not changed. (setq acadObj (vlax-get-acad-object)) (setq preferences (vla-get-Preferences acadObj)) ;; Specify the profile to import. (setq strProfileToImport "TestProfile") (vla-ImportProfile (vla-get-Profiles preferences) strProfileToImport (findfile "TESTPROFILE.ARG") :vlax-true) ) |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2024-12-15 22:34
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.