zoukankan      html  css  js  c++  java
  • 设定AutoCAD的基本设定(.NET)

    AutoCAD.NET API不包含用于访问从AutoCAD的[选项]对话框中可访问的选项的类别和方法。这些选项包括ActiveX® 使用自动库访问。

    使用从Application对象的Preferences属性返回的COM对象。获得Preferences COM对象后,可访问选项相关的9个对象。

    这些对象分别表示“选项”对话框的选项卡。这些对象可以访问注册表中保存的[选项]对话框中的所有选项。

    您可以使用这些对象的属性来自定义AutoCAD的各种设置。对象如下。

    • PreferencesDisplay
    • PreferencesDrafting
    • PreferencesFiles
    • PreferencesOpenSave
    • PreferencesOutput
    • PreferencesProfiles
    • PreferencesSelection
    • PreferencesSystem
    • PreferencesUser

    访问Preferences对象

    在以下示例中,示出了使用COM相互运用功能访问Preferences对象的方法。

    Dim acPrefComObj As AcadPreferences = Application.Preferences

    在引用Preferences对象后,可以使用Display、Drafting、Files、OpenSave、Output、Profile、Selection、System、User属性来访问各自的Preferences对象。

    将交叉发夹光标设置为全屏

    Imports Autodesk.AutoCAD.ApplicationServices
    Imports Autodesk.AutoCAD.Runtime
    Imports Autodesk.AutoCAD.Interop
     
    <CommandMethod("PrefsSetCursor")> _
    Public Sub PrefsSetCursor()
        '' This example sets the crosshairs of the AutoCAD drawing cursor
        '' to full screen.
     
        '' Access the Preferences object
        Dim acPrefComObj As AcadPreferences = Application.Preferences
     
        '' Use the CursorSize property to set the size of the crosshairs
        acPrefComObj.Display.CursorSize = 100
    End Sub
  • 相关阅读:
    截取小数位数(准确四舍五入及直接截取)
    水印
    用心整理的 献丑啦 一些关于http url qs fs ...模块的方法
    html禁止清除input文本输入缓存的两种方法
    flink写入elasticsearch报错!OOM内存溢出!连接异常关闭!
    实现网格建造系统
    AcWing 1064. 小国王
    AcWing 1052. 设计密码
    KMP 模板
    AcWing 1058. 股票买卖 V
  • 原文地址:https://www.cnblogs.com/rf8862/p/15253555.html
Copyright © 2011-2022 走看看