CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

相关分类

配置文件属性 (ActiveX)

2023-1-3 20:13| 发布者: admin| 查看: 452| 评论: 0|来自: AutoCAD

摘要: 获取用于存储硬件设备驱动程序信息的配置文件的位置。

获取用于存储硬件设备驱动程序信息的配置文件的位置。

支持的平台:仅窗口

签名

工 务 局:

object.ConfigFile
对象

类型:首选项文件

此属性适用的对象。

属性值

只读:是的

类型:字符串

用于存储硬件设备驱动程序信息的配置文件的位置。

言论

此值是只读的,只能使用命令行开关进行更改。有关命令行开关的详细信息,请参阅 AutoCAD 联机帮助。/c

例子

工 务 局:

Sub Example_ConfigFile()
    ' This example returns the current setting of ConfigFile.
    
    Dim preferences As AcadPreferences
    Dim currConfigFile As String
    
    Set preferences = ThisDrawing.Application.preferences
    
    ' Retrieve the current ConfigFile value
    currConfigFile = preferences.Files.ConfigFile
    If currConfigFile = "" Then
        MsgBox "ConfigFile is not currently set.", vbInformation, "ConfigFile Example"
    Else
        MsgBox "The current value for ConfigFile is " & currConfigFile, vbInformation, "ConfigFile Example"
    End If
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ConfigFile()
    ;; This example returns the current setting of ConfigFile.
    (setq acadObj (vlax-get-acad-object))
    (setq preferences (vla-get-Preferences acadObj))
  
    ;; Retrieve the current ConfigFile value
    (setq currConfigFile (vla-get-ConfigFile (vla-get-Files preferences)))
    (if (= currConfigFile "")
        (alert "ConfigFile is not currently set.")
        (alert (strcat "The current value for ConfigFile is " currConfigFile))
    )
)

路过

雷人

握手

鲜花

鸡蛋

最新评论

QQ|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 )

GMT+8, 2024-5-12 04:23

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部