AutoCAD .NET API基础(一) AutoCAD 对象层次结构(3)

3The Database Object   Database对象

The Database object contains all of the graphical and most of the nongraphical AutoCAD objects. Some of the objects contained in the database are entities, symbol tables, and named dictionaries. Entities in the database represent graphical objects within a drawing. Lines, circles, arcs, text, hatch, and polylines are examples of entities. A user can see an entity on the screen and can manipulate it.

Database对象包含AutoCAD所有的图形对象和决大部分非图形对象,其中包括实体(图元)、符号表、命名字典等。实体(图元)表示图形里的图形对象,直线、圆、弧线、文字、填充和多义线等都是图元。用户能在屏幕上看到图元并对其进行操作。

You access the Database object for the current document by the Document object’s Database member property.

可通过Document对象的Database成员属性来访问当前文档的Database对象:

 

Application.DocumentManager.MdiActiveDocument.Database

Symbol Tables and Dictionaries  符号表和字典

Symbol table and dictionary objects provide access to nongraphical objects (blocks, layers, linetypes, layouts, and so forth). Each drawing contains a set of nine fixed symbol tables, whereas the number of dictionaries in a drawing can vary based on the features and types of applications used in AutoCAD. New symbol tables cannot be added to a database.

符号表和字典用来访问非图形对象(块、图层、线型、布局,等等)。由于图形文件中字典的个数会因AutoCAD应用程序的特点和类型而变化,因此,每个图形文件包含有9个固定的符号表。新的符号表不能被添加到数据库里。

Examples of symbol tables are the layer table (LayerTable), which contains layer table records, and the block table (BlockTable), which contains block table records. All graphical entities (lines, circles, arcs, and so forth) are owned by a block table record. By default, every drawing contains predefined block table records for Model and Paper space. Each Paper space layout has its own block table record. For more information on working with symbol tables, see Collection Objects.

符号表的例子,如图层表(LayerTable),其中包含图层表记录,还有块表(BlockTable),其中包含块表记录,等。所有的图形实体(线、圆、弧等等)都属于一个块表记录。缺省情况下,任何图形文件都包含有为模型空间和图纸空间预定义的块表记录。每个图纸空间布局拥有自己的块表记录。更多的符号表信息,见集合对象

A dictionary is a container object which can contain any AutoCAD object or an XRecord. Dictionaries are stored either in the database under the named object dictionary or as an extension dictionary of a table record or graphical entity. The named object dictionary is the master table for all of the dictionaries associated with a database. Unlike symbol tables, new dictionaries can be created and added to the named object dictionary. For more information on working with dictionaries, see Collection Objects.

字典是可以包含任何AutoCAD对象或XRecord的容器对象。字典要么保存在命名对象字典下的数据库里,要么作为一个表记录或图形实体的扩展字典来保存。命名对象字典是与数据库关联的所有字典的主表。与符号表不同,新的字典可以被创建并添加到命名对象字典里。更多的字典的信息,见集合对象

 

NoteDictionary objects cannot contain drawing entities.

注意:字典对象不包含图形实体。

 

VBA/ActiveX Cross Reference

VBA/ActiveX交叉引用

The Database object in the .NET API is similar to the Document object in the ActiveX Automation library. To access most of the properties that are available in the Document object of the ActiveX Automation library, you will need to work with the Document and Database objects of the .NET API. For more information on the Document object of the .NET API, see The Document Object.

AutoCAD .NET API中的Database对象与ActiveX Automation库中的Document对象类似。必须使用.NET API中的Document对象和Database对象,才能访问ActiveX Automation库中Document对象的大多数可用属性。.NET APIDocument对象的更多信息,见Document 对象

 

              

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
AutoCAD .NET API(应用程序编程接口)是用于在AutoCAD软件中定制和扩展功能的编程工具。它提供了一组功能强大的类和方法,使开发人员能够通过编程方式访问和操作AutoCAD的各种对象和功能。 要下载AutoCAD .NET API,可以按照以下步骤进行操作: 1. 打开Autodesk官方网站,进入AutoCAD的下载页面。 2. 在页面上,找到AutoCAD .NET API的下载选项。通常可以在“附加工具”或“开发者工具”部分中找到。 3. 单击下载链接,选择适用于您的操作系统版本的AutoCAD .NET API软件包。 4. 点击下载按钮,等待下载完成。 在下载完成后,您可以按照以下步骤安装AutoCAD .NET API: 1. 打开下载文件的位置,双击运行安装程序。 2. 遵循安装程序的指示,选择您想要安装的文件夹和配置选项。 3. 完成安装后,您可以在指定的文件夹中找到安装文件和示例代码。 安装完成后,您可以开始使用AutoCAD .NET API来开发自定义功能。您可以使用.NET编程语言(如C#或VB.NET)来编写代码,并使用AutoCAD .NET API中的类和方法来访问和操作AutoCAD中的对象,如图形、图层、块等。您还可以创建自定义命令、工具栏、菜单和对话框,以及执行各种操作,如绘制、修改、查询和导出CAD数据。 总之,要下载AutoCAD .NET API,只需前往官方网站下载页面,并按照指示进行下载和安装即可。安装完成后,您可以使用AutoCAD .NET API进行自定义开发和定制AutoCAD软件的功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值