您的位置:首页 > 其它

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

2011-06-20 12:41 399 查看
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 API的Document对象的更多信息,见Document 对象。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: