2022年AutoCAD二次开发初级入门教程 .pdf
《2022年AutoCAD二次开发初级入门教程 .pdf》由会员分享,可在线阅读,更多相关《2022年AutoCAD二次开发初级入门教程 .pdf(6页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、1. Components of the AutoCAD .NET API Dll AcDbMgd.dll. Use when working with objects in a drawing file. AcMgd.dll. Use when working with the AutoCAD application. AcCui.dll. Use when working with customization files.Before classes, structures, methods, and events found in one of the AutoCAD .NET API
2、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. Once a AutoCAD .NET API DLL is referenced, you must set the Copy Local property 局部性质of the referenced DLL to F
3、alse. Reason :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 file
4、s can cause unexpected results when you load your assembly file in AutoCAD. 2. To reference an AutoCAD .NET API DLL In Microsoft Visual Studio, click View menu Solution Explorer to display the Solution Explorer if it is not already displayed. In the Solution Explorer, on the toolbar along the top, c
5、lick Show All Files. Right-click the References node and click Add Reference. In the Add Reference dialog box, Browse tab, select the DLL file that contains the library you want to use and click OK. In the Solution Explorer, click the plus sign to the left the References node to expand it. Select th
6、e referenced library from the References node. Right-click over the selected reference and click Properties. In the Properties window, click the Copy Local field and select False from the drop-down list. 3. 合适网站终于找到了http:/ 帮助名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - -
7、 - 第 1 页,共 6 页 - - - - - - - - - http:/ samples developercentre groups http:/news:/ 移植思路添加 dotnet 的应用Autocad2010 type library(类型库 ) Com autodesk.autocad.dll Com-mon.dll Acmgd.dll Acadmgd.dll5. Thisdrawing 的获得方法Private readonly property thisdrawing() as acaddocument Get Return autodesk.autocad.applic
8、ationservices.application.documentmanager.mdiactivedocument.acaddocument End get End property Vbdotnet 必须指明其数据类型。Cint,cstring 6. 基本定义Public sub starthere() Dim c as object Set c = new class1 c.showmessage ” 模块运行中 ”end sub 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - -
9、第 2 页,共 6 页 - - - - - - - - - 7. autocad 对象层次Transaction : 事务,由用户和应用程序执行的一个动作或一系列动作Housed :封装subsequent step :后续步骤database access :数据库存取Symbol Tables :符号集Object References :参照对象Encapsulate: 封装Delineate: 描述database-resident :数据库驻留8. 具体代码 Get the current document and database, and start a transaction
10、Dim acDocAs Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database 详见 lab3. E:net 开发autocad_2010_dotnet_trainingVB.NET 创建 3 个图形并分装在一个图块中。create an Employee object (1 circle, 1 ellipse and one MText object) 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - -
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年AutoCAD二次开发初级入门教程 2022 AutoCAD 二次开发 初级 入门教程
限制150内