CAD开发者社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

ActiveX 开发指南

关于设置 AutoCAD 首选项 (VBA/ActiveX)

2023-1-5 02:52| 发布者: admin| 查看: 684| 评论: 0|来自: AutoCAD

摘要: 有九个与选项相关的对象,每个对象表示“选项”对话框中的一个选项卡。

有九个与选项相关的对象,每个对象表示“选项”对话框中的一个选项卡。

这些对象提供对“选项”对话框中所有注册表存储选项的访问。您可以使用在这些对象上找到的特性来自定义许多 AutoCAD 设置。这些对象是

  • 首选项显示
  • 首选项起草
  • 首选项文件
  • 首选项打开保存
  • 首选项输出
  • 首选项配置文件
  • 首选项选择
  • 首选项系统
  • 首选项用户

这些对象可通过该对象访问。要获得对对象的访问权限,请使用对象的属性:PreferencesPreferencesPreferencesApplication

Dim acadPref as AcadPreferences
Set acadPref = ThisDrawing.Application.Preferences

然后,您可以使用 ,,,,,,,, 和属性访问任何特定对象。PreferencesDisplayDraftingFilesOpenSaveOutputProfileSelectionSystemUser

将十字准线设置为全屏

Sub Ch2_PrefsSetCursor()
  ' This example sets the crosshairs of the AutoCAD drawing cursor
  ' to full screen.

  ' Access the Preferences object
  Dim acadPref As AcadPreferences
  Set acadPref = ThisDrawing.Application.Preferences

  ' Use the CursorSize property to set the size of the crosshairs
  acadPref.Display.CursorSize = 100
End Sub

显示屏幕菜单和滚动条

Sub Ch2_PrefsSetDisplay()
  ' This example disables the scroll
  ' bars with the DisplayScrollBars
  ' properties.

  ' Access the Preferences object
  Dim acadPref As AcadPreferences
  Set acadPref = ThisDrawing.Application.Preferences

  ' Display the and disable scroll bars
  acadPref.Display.DisplayScrollBars = False
End Sub

路过

雷人

握手

鲜花

鸡蛋

最新评论

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

GMT+8, 2024-5-19 14:35

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部