导入其他用户创建的配置文件。 支持的平台:仅窗口 签名工 务 局: object.ImportProfile Profile, RegFile, IncludePathInfo
返回值(RetVal)无返回值。 言论没有额外的评论。 例子工 务 局: 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
Visual 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, 2025-10-29 14:11
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.