- 1、本文档共43页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
AutoCAD.NET API Training Labs PAGE 6
AutoCAD 2007 .NET API Training Labs - C#
Table of Contents
TOC \o 1-3 \h \z \u AutoCAD 2007 .NET API Training Labs - C# 1
Lab 1 – Hello World: Accessing ObjectARX .NET Wrappers 1
Create your first AutoCAD managed application 2
Connect to the AutoCAD Managed API – AcMgd.dll and AcDbMgd.dll 2
Define your first command 2
Test in AutoCAD 2
Lab 2 – .NET AutoCAD Wizard and more with the Editor class 3
The AutoCAD Managed Application Wizard 3
Prompt for User Input 3
Prompt to obtain a geometric distance 4
Lab 3 – Database Fundamentals: Creating our Employee Object 4
Add a command to create the Employee object 5
Handling Exceptions – First look 6
Transactions, Exception Handling and Dispose 7
Finish up the Employee object 7
More about Transactions, Exception Handling and Dispose 7
Create a Layer for the Employee 7
Add color to the Employee 8
Create an explicit Employee Block 8
Create a Block Reference for the new Employee block 9
Visual Studio 2005 Using Keyword 9
Extra credit questions: 10
Lab 4 – Database Fundamentals Part 2: Adding Custom Data 11
Create a custom structure in the Named Objects Dictionary 11
Add an Xrecord to our new structure hold custom data 12
Add an XRecord for each Employee Block Reference Instance 13
Iterate Model Space to Count each Employee Object 13
Notes about the completed lab 14
Lab 5 – User Interaction: Prompts and Selection 16
Prompts 17
Block Attributes 17
Modify CreateEmployee () for reuse 17
Modify CreateDivision() for reuse 19
Define the CREATE command to create the employee 19
Selection 22
Lab 6 – More User Interface: Adding Custom Data 22
Custom Context Menu 23
Modeless, Dockable Palette Window with Drag and Drop 25
Drag and Drop Support in the Modeless Form 26
Entity Picking from a Modal Form 28
Adding a Page to the AutoCAD Options Dialog 30
Extra credit: Setup the dial
文档评论(0)