注册 登录
明经CAD社区 返回首页

sunchengbo2007的个人空间 http://www.mjtd.com/?396505 [收藏] [复制] [分享] [RSS]

日志

AutoCAD .NET API组件

已有 1218 次阅读2011-6-30 08:14 |个人分类:AutoCAD .NET DevelopGuide翻译|系统分类:开发

Components of the AutoCAD .NET API

AutoCAD .NET API组件

The AutoCAD .NET API is made up of different DLL files that contain a wide range of classes, structures, methods, and events that provide access to objects in a drawing file or the AutoCAD application. Each DLL file defines different namespaces which are used to organize the components of the libraries based on functionality.

AutoCAD .NET API由不同的DLL文件组成,这些DLL文件包含有大量的类、结构、方法及事件,用于访问图形文件对象或AutoCAD程序对象。每个DLL文件定义了不同的命名空间,按功能组织API组件。

The three main DLL files of the AutoCAD .NET API that you will frequently use are:

常用的AutoCAD .NET API的三个主要DLL文件是:

·         AcDbMgd.dll. Use when working with objects in a drawing file. 用于处理图形文件对象;

·         AcMgd.dll. Use when working with the AutoCAD application. 用于处理AutoCAD应用程序;

·         AcCui.dll. Use when working with customization files. 用于处理自定义文件;

Use an AutoCAD .NET API DLL 引用AutoCAD .NET API DLL文件

Before classes, structures, methods, and events found in one of the AutoCAD .NET API related DLLs can be used, you must reference the DLL to a project. After a DLL is referenced to a project, you can utilize the namespaces and the components in the DLL file in your project.

使用AutoCAD .NET API相关DLL文件里提供的类、结构、方法及事件之前,必须在你的VisualStudio工程中引用相应的DLL文件。完成引用后,你就可以在工程中使用该DLL文件里定义的命名空间和API组件。

Once a AutoCAD .NET API DLL is referenced, you must set the Copy Local property of the referenced DLL to False. The Copy Local property determines if Microsoft Visual Studio creates a copy of the referenced DLL file and places it in the same directory as the assembly file of the project when it is built. Since the referenced files already ship with AutoCAD, creating copies of referenced DLL files can cause unexpected results when you load your assembly file in AutoCAD.

一旦引用了AutoCAD .NET API DLL文件,应将该引用的“复制本地”属性设置为False(设置方法:解决方案资源管理器->右键该引用->属性->复制本地->False)。“复制本地”属性确定当Microsoft Visual Studio编译工程时是否创建一个引用文件的副本并将它放在与工程的程序集文件相同的目录下。 由于AutoCAD安装目录里包含有相同文件名的DLL文件, 因此,如果创建了引用文件副本,当加载程序集文件到AutoCAD中时可能会引发意想不到的结果。

Location of AutoCAD .NET API DLL files 定位AutoCAD .NET API DLL文件

The AutoCAD .NET API DLL files can be located at <drive>:\Program Files\AutoCAD 2012 or as part of the AutoCAD 2012 ObjectARX SDK which can be downloaded from http://www.objectarx.com or the Autodesk Developer Network Web site (http://www.autodesk.com/adn).

AutoCAD .NET API DLL文件位于AutoCAD安装目录里(<盘符>:\program Files\AutoCAD 2012),同时,作为AutoCAD 2012 ObjectARX SDK开发包的一部分,从http://www.objectarx.com下载,或从AutoCAD开发者网站下载(http://www.autodesk.com/adn)。

After the ObjectARX SDK is installed, the DLL files can be found in the inc-win32 and inc-x64 folders under the main install folder.

安装ObjectARX SDK开发包后,可以在主安装目录下的inc目录下找到AutoCAD .NET API DLL文件。

 

Note The DLLs in the ObjectARX SDK are simplified versions of the same files that ship with AutoCAD, as they do not contain dependencies on the AutoCAD user interface. It is recommended that you download and install the ObjectARX SDK, and then reference the DLL files that come with the SDK instead of those that are found in the install directory of AutoCAD 2012.

注意:ObjectARX SDK开发包里的.NET API DLL文件是AutoCAD软件包里相应DLL文件的简化版本,不包含AutoCAD用户界面相关内容。推荐下载并安装ObjectARX SDK开发包,在工程中引用开发包里的DLL文件,而不引用AutoCAD2012安装目录里的文件。

 

(下载、安装及在VisualStudio项目中引用组件的相关内容略 -译者注)

 

 已同步至 sunchengbo2007的微博

路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 注册

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-4-26 06:02 , Processed in 0.165133 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部