没有合适的资源?快使用搜索试试~ 我知道了~
首页Visual Studio+C#教程:入门AutoCAD.NET CAD开发
Visual Studio+C#教程:入门AutoCAD.NET CAD开发
需积分: 13 4 下载量 17 浏览量
更新于2024-07-17
收藏 1.52MB PDF 举报
".Net CAD开发教程"是一本专为CAD初学者设计的高清PDF教程,由Stephen Preton和Autodesk Developer Technical Services Team (DevTech)编著。本书主要讲解如何利用Visual Studio工具,结合C#和VB.NET进行AutoCAD的定制开发。作者从理论到实践,深入剖析了.NET API和Visual Studio的集成应用。
首先,该教程介绍了AutoCAD.NET开发者指南的概览,包括章节内容概述和指南的整体组织结构。重点在于对AutoCAD.NET API的详细介绍,包括其组成部分,如图形处理、几何对象操作、用户界面等。读者可以了解到如何通过.NET API访问AutoCAD的功能,并了解如何在.NET环境中利用这些功能来创建自定义插件或应用程序。
接着,作者指导读者如何选择合适的Microsoft Visual Studio版本,强调了.NET与COM兼容性的使用以及可能存在的依赖性和限制。此外,书中还提供了如何在.NET环境中替代ActiveX自动化技术,以便更高效地开发AutoCAD插件。
在实际操作部分,教程以“Getting Started with Microsoft Visual Studio”为标题,引导读者熟悉Visual Studio的工作环境。这部分涵盖了项目管理的基础,如理解Visual Studio项目结构、定义项目组件(如类模块、窗体)、引用外部库和管理项目信息。作者详细演示了如何创建新项目、打开现有项目或解决方案、保存项目,以及如何在多个项目间切换。
这本教程不仅提供了理论知识,还有丰富的实例和步骤,帮助读者逐步掌握如何使用C#和VB.NET语言结合Visual Studio工具进行AutoCAD的定制开发。无论是初学者还是有一定经验的开发者,都能从中找到适合自己的学习资源和实践指导,提升在CAD领域的.NET开发能力。
C#..................................................................................................................................... 363
VBA/ActiveX Code Reference....................................................................................... 364
Use Unicode Characters, Control Codes, and Special Characters........................................... 365
Substitute Fonts....................................................................................................................... 366
Specify an Alternative Default Font................................................................................... 366
Check Spelling......................................................................................................................... 367
6 Dimensions and Tolerances .....................................................................................368
Topics in this section............................................................................................................ 368
Dimensioning Concepts .............................................................................................................. 368
Topics in this section............................................................................................................ 369
Parts of a Dimension ............................................................................................................... 369
Define the Dimension System Variables .................................................................................. 370
VB.NET ............................................................................................................................ 370
C#..................................................................................................................................... 370
VBA/ActiveX Code Reference....................................................................................... 370
Set Dimension Text Styles....................................................................................................... 370
Understand Leader Lines......................................................................................................... 371
Understand Associative Dimensions........................................................................................ 371
Create Dimensions...................................................................................................................... 371
Topics in this section............................................................................................................ 372
Create Linear Dimensions ....................................................................................................... 372
Dimension joglines............................................................................................................ 372
VB.NET ............................................................................................................................ 373
C#..................................................................................................................................... 373
VBA/ActiveX Code Reference....................................................................................... 374
Create a rotated linear dimension..................................................................................... 374
VB.NET ............................................................................................................................ 374
C#..................................................................................................................................... 375
VBA/ActiveX Code Reference....................................................................................... 375
Create Radial Dimensions ....................................................................................................... 376
Create a radial dimension................................................................................................. 377
VB.NET ............................................................................................................................ 377
C#..................................................................................................................................... 377
VBA/ActiveX Code Reference....................................................................................... 378
Create Angular Dimensions ..................................................................................................... 379
Create an angular dimension............................................................................................ 379
VB.NET ............................................................................................................................ 379
C#..................................................................................................................................... 380
VBA/ActiveX Code Reference....................................................................................... 381
Create Jogged Radius Dimensions.......................................................................................... 381
Create a jogged radius dimension .................................................................................... 382
VB.NET ............................................................................................................................ 382
C#..................................................................................................................................... 383
VBA/ActiveX Code Reference....................................................................................... 383
Create Arc Length Dimensions ................................................................................................ 384
Create an arc length dimension ........................................................................................ 384
VB.NET ............................................................................................................................ 384
C#..................................................................................................................................... 385
VBA/ActiveX Code Reference....................................................................................... 386
Create Ordinate Dimensions.................................................................................................... 386
Create an ordinate dimension........................................................................................... 387
VB.NET ............................................................................................................................ 387
C#..................................................................................................................................... 388
VBA/ActiveX Code Reference....................................................................................... 388
Edit Dimensions .......................................................................................................................... 389
Topics in this section............................................................................................................ 390
Override Dimension Text ......................................................................................................... 390
Modify dimension text....................................................................................................... 390
VB.NET ............................................................................................................................ 390
C#..................................................................................................................................... 391
VBA/ActiveX Code Reference....................................................................................... 392
Work with Dimension Styles........................................................................................................ 392
Topics in this section............................................................................................................ 392
Create, Modify, and Copy Dimension Styles............................................................................ 393
Copy dimension styles and overrides ............................................................................... 393
VB.NET ............................................................................................................................ 393
C#..................................................................................................................................... 395
VBA/ActiveX Code Reference....................................................................................... 397
Override the Dimension Style .................................................................................................. 397
Enter a user-defined suffix for an aligned dimension......................................................... 401
VB.NET ............................................................................................................................ 401
C#..................................................................................................................................... 402
VBA/ActiveX Code Reference....................................................................................... 403
Dimension in Model Space and Paper Space ............................................................................. 403
Create Leaders and Annotation................................................................................................... 404
Topics in this section............................................................................................................ 404
Create Leader Lines ................................................................................................................ 404
Create a leader line .......................................................................................................... 405
VB.NET ............................................................................................................................ 405
C#..................................................................................................................................... 405
VBA/ActiveX Code Reference....................................................................................... 406
Add the Annotation to a Leader ............................................................................................... 406
Leader Associativity................................................................................................................. 407
Associate a leader to the annotation................................................................................. 407
VB.NET ............................................................................................................................ 407
C#..................................................................................................................................... 408
VBA/ActiveX Code Reference....................................................................................... 409
Edit Leader Associativity.......................................................................................................... 410
Edit Leaders ............................................................................................................................ 410
Use Geometric Tolerances.......................................................................................................... 410
Topics in this section............................................................................................................ 410
Create Geometric Tolerances.................................................................................................. 411
Create a geometric tolerance............................................................................................ 411
VB.NET ............................................................................................................................ 411
C#..................................................................................................................................... 412
VBA/ActiveX Code Reference....................................................................................... 412
Edit Geometric Tolerances ...................................................................................................... 413
7 Work in Three-Dimensional Space ...........................................................................414
Topics in this section............................................................................................................ 414
Specify 3D Coordinates............................................................................................................... 414
Define and query the coordinates for 2D and 3D polylines................................................ 414
VB.NET ............................................................................................................................ 414
C#..................................................................................................................................... 416
VBA/ActiveX Code Reference....................................................................................... 417
Define a User Coordinate System ............................................................................................... 418
Create a new UCS, make it active, and translate the coordinates of a point into the UCS
coordinates....................................................................................................................... 419
VB.NET ............................................................................................................................ 419
C#..................................................................................................................................... 420
VBA/ActiveX Code Reference....................................................................................... 422
Convert Coordinates ................................................................................................................... 423
Translate OCS coordinates to WCS coordinates .............................................................. 424
VB.NET ............................................................................................................................ 424
C#..................................................................................................................................... 425
VBA/ActiveX Code Reference....................................................................................... 427
Create 3D Objects....................................................................................................................... 428
Topics in this section............................................................................................................ 428
Create Wireframes................................................................................................................... 428
Create Meshes ........................................................................................................................ 428
Create a polygon mesh..................................................................................................... 429
VB.NET ............................................................................................................................ 429
C#..................................................................................................................................... 430
VBA/ActiveX Code Reference....................................................................................... 431
Create Polyface Meshes.......................................................................................................... 432
Create a polyface mesh.................................................................................................... 432
VB.NET ............................................................................................................................ 432
C#..................................................................................................................................... 433
VBA/ActiveX Code Reference....................................................................................... 435
Create Solids........................................................................................................................... 435
Create a wedge solid........................................................................................................ 436
VB.NET ............................................................................................................................ 436
C#..................................................................................................................................... 437
VBA/ActiveX Code Reference....................................................................................... 438
Edit in 3D .................................................................................................................................... 438
Topics in this section............................................................................................................ 438
Rotate in 3D............................................................................................................................. 438
Create a 3D box and rotate it about an axis...................................................................... 439
VB.NET ............................................................................................................................ 439
C#..................................................................................................................................... 440
VBA/ActiveX Code Reference....................................................................................... 441
Array in 3D............................................................................................................................... 441
Create a 3D rectangular array .......................................................................................... 441
VB.NET ............................................................................................................................ 441
C#..................................................................................................................................... 444
VBA/ActiveX Code Reference....................................................................................... 446
Mirror Objects Along a Plane ................................................................................................... 447
Mirror in 3D....................................................................................................................... 447
VB.NET ............................................................................................................................ 447
C#..................................................................................................................................... 448
VBA/ActiveX Code Reference....................................................................................... 449
Edit 3D Solids.............................................................................................................................. 450
Find the interference between two solids.......................................................................... 450
VB.NET ............................................................................................................................ 450
C#..................................................................................................................................... 451
VBA/ActiveX Code Reference....................................................................................... 452
Slice a solid into two solids ............................................................................................... 453
VB.NET ............................................................................................................................ 453
C#..................................................................................................................................... 454
VBA/ActiveX Code Reference....................................................................................... 455
8 Define Layouts and Plot ............................................................................................456
Topics in this section............................................................................................................ 456
Model Space and Paper Space................................................................................................... 456
Layouts ....................................................................................................................................... 456
Topics in this section............................................................................................................ 457
Layouts and Blocks.................................................................................................................. 457
Plot Settings ............................................................................................................................ 457
Layout Settings........................................................................................................................ 457
Topics in this section............................................................................................................ 458
Paper Size and Units............................................................................................................ 458
Plot Origin ............................................................................................................................ 458
Plot Area .............................................................................................................................. 458
Plot Scale............................................................................................................................. 459
Lineweight Scale.................................................................................................................. 460
Plot Device........................................................................................................................... 460
Query and Set Layout Settings............................................................................................. 460
VB.NET ............................................................................................................................ 460
C#..................................................................................................................................... 461
VBA/ActiveX Code Reference....................................................................................... 462
Viewports .................................................................................................................................... 463
Topics in this section............................................................................................................ 463
Floating Viewports ................................................................................................................... 463
To toggle between Model and Paper space...................................................................... 464
VB.NET ............................................................................................................................ 464
C#..................................................................................................................................... 465
VBA/ActiveX Code Reference....................................................................................... 465
Create Paper Space Viewports................................................................................................ 466
Create and enable a floating viewport............................................................................... 466
VB.NET ............................................................................................................................ 466
C#..................................................................................................................................... 467
VBA/ActiveX Code Reference....................................................................................... 468
Create four floating viewports ........................................................................................... 469
VB.NET ............................................................................................................................ 469
C#..................................................................................................................................... 470
VBA/ActiveX Code Reference....................................................................................... 472
Change Viewport Views and Content....................................................................................... 473
Scale Views Relative to Paper Space...................................................................................... 473
Scale Pattern Linetypes in Paper Space.................................................................................. 474
Use Shaded Viewports ............................................................................................................ 474
Plot Your Drawing ....................................................................................................................... 475
Topics in this section............................................................................................................ 475
Plot from Model Space............................................................................................................. 475
Plot the extents of the Model layout .................................................................................. 476
VB.NET ............................................................................................................................ 476
C#..................................................................................................................................... 478
VBA/ActiveX Code Reference....................................................................................... 480
Plot from Paper Space............................................................................................................. 481
9 Use Events..................................................................................................................482
Topics in this section............................................................................................................ 482
Understand the Events in AutoCAD ............................................................................................ 482
Guidelines for Event Handlers..................................................................................................... 483
Register and Unregister Events................................................................................................... 484
Register an event ............................................................................................................. 484
VB.NET ............................................................................................................................ 484
C#..................................................................................................................................... 484
Unregister an event .......................................................................................................... 484
VB.NET ............................................................................................................................ 485
C#..................................................................................................................................... 485
Handle Application Events........................................................................................................... 485
Enable an Application object event................................................................................... 486
VB.NET ............................................................................................................................ 486
C#..................................................................................................................................... 487
VBA/ActiveX Code Reference....................................................................................... 487
Handle Document Events............................................................................................................ 488
Enable a Document object event ...................................................................................... 489
VB.NET ............................................................................................................................ 489
C#..................................................................................................................................... 489
VBA/ActiveX Code Reference....................................................................................... 490
Handle DocumentCollection Events ............................................................................................ 490
Enable a DocumentCollection object event....................................................................... 492
VB.NET ............................................................................................................................ 492
C#..................................................................................................................................... 492
VBA/ActiveX Code Reference....................................................................................... 493
Handle Object Events.................................................................................................................. 493
Enable an Object event .................................................................................................... 494
VB.NET ............................................................................................................................ 495
C#..................................................................................................................................... 496
VBA/ActiveX Code Reference....................................................................................... 497
Register COM Based Events with .NET ...................................................................................... 498
Register a COM based event............................................................................................ 498
VB.NET ............................................................................................................................ 498
C#..................................................................................................................................... 499
VBA/ActiveX Code Referemce...................................................................................... 499
10 Develop Applications with VB.NET and C# ..........................................................501
Topics in this section............................................................................................................ 501
Handle Errors.............................................................................................................................. 501
Topics in this section............................................................................................................ 501
Define Application Error Types ................................................................................................ 502
Trap Runtime Errors ................................................................................................................ 502
Topics in this section............................................................................................................ 502
Use Try Statements ............................................................................................................. 503
Try-Catch Statement......................................................................................................... 503
Try-Finally Statement........................................................................................................ 503
Try-Catch-Finally Statement ............................................................................................. 503
Test error handling without and with the Try-Catch-Finally statement ............................... 503
VB.NET ............................................................................................................................ 504
C#..................................................................................................................................... 504
Use the Exception Object..................................................................................................... 505
On Error Statements (VB.NET) ............................................................................................ 506
On Error Resume Next statement..................................................................................... 506
On Error GoTo Label statement........................................................................................ 506
Use the Err object with trapped errors .............................................................................. 506
Compare Error Handlers in VBA or VB to .NET.................................................................... 507
On Error - VBA ................................................................................................................. 507
Try-Catch - VB.NET.......................................................................................................... 507
Respond to User Input Errors .................................................................................................. 508
Distribute Your Application .......................................................................................................... 508
To generate a Release build for a .NET assembly........................................................ 508
Load a .NET assembly ..................................................................................................... 508
Demand load a .NET application ...................................................................................... 509
VB.NET ............................................................................................................................ 509
C#..................................................................................................................................... 511
剩余540页未读,继续阅读
点击了解资源详情
点击了解资源详情
点击了解资源详情
2014-10-21 上传
点击了解资源详情
点击了解资源详情
点击了解资源详情
点击了解资源详情
2009-01-13 上传
pengfeixc
- 粉丝: 53
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MATLAB实现小波阈值去噪:Visushrink硬软算法对比
- 易语言实现画板图像缩放功能教程
- 大模型推荐系统: 优化算法与模型压缩技术
- Stancy: 静态文件驱动的简单RESTful API与前端框架集成
- 掌握Java全文搜索:深入Apache Lucene开源系统
- 19计应19田超的Python7-1试题整理
- 易语言实现多线程网络时间同步源码解析
- 人工智能大模型学习与实践指南
- 掌握Markdown:从基础到高级技巧解析
- JS-PizzaStore: JS应用程序模拟披萨递送服务
- CAMV开源XML编辑器:编辑、验证、设计及架构工具集
- 医学免疫学情景化自动生成考题系统
- 易语言实现多语言界面编程教程
- MATLAB实现16种回归算法在数据挖掘中的应用
- ***内容构建指南:深入HTML与LaTeX
- Python实现维基百科“历史上的今天”数据抓取教程
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功