📅  最后修改于: 2023-12-03 14:59:25.409000             🧑  作者: Mango
AutoCAD 2017是一款由美国Autodesk公司开发的计算机辅助设计软件,它是AutoCAD系列的最新版本,于2016年3月发行。AutoCAD常用于建筑设计、机械设计、电子电气设计和土木工程等领域。
AutoCAD 2017具有以下特性:
AutoCAD 2017可以被广泛应用于建筑、机械、电子电气和土木工程等领域。其中,AutoCAD 2017的应用方向包括以下领域:
AutoCAD 2017 API是用于开发自定义AutoCAD应用程序的接口。AutoCAD API通过提供.NET接口,允许开发人员使用C#、VB.NET和其他.NET编程调用AutoCAD API接口,并实现自定义应用程序。AutoCAD API包括以下内容:
下面是AutoCAD 2017 API中的代码片段示例:
'定义新的圆弧
Dim ptCenter As Autodesk.AutoCAD.Geometry.Point3d = New Autodesk.AutoCAD.Geometry.Point3d(1, 1, 0)
Dim radius As Double = 2.0
Dim startAngle As Double = 0.0
Dim endAngle As Double = Math.PI / 2
'使用API进行绘制
Dim doc As Autodesk.AutoCAD.ApplicationServices.Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
Dim db As Autodesk.AutoCAD.DatabaseServices.Database = doc.Database
Dim trans As Autodesk.AutoCAD.DatabaseServices.Transaction = db.TransactionManager.StartTransaction
Using trans
Dim bt As Autodesk.AutoCAD.DatabaseServices.BlockTable = CType(trans.GetObject(db.BlockTableId, Autodesk.AutoCAD.DatabaseServices.OpenMode.ForRead), Autodesk.AutoCAD.DatabaseServices.BlockTable)
Dim btr As Autodesk.AutoCAD.DatabaseServices.BlockTableRecord = CType(trans.GetObject(bt(BlockTableRecord.ModelSpace), Autodesk.AutoCAD.DatabaseServices.OpenMode.ForWrite), Autodesk.AutoCAD.DatabaseServices.BlockTableRecord)
Dim arc As Autodesk.AutoCAD.DatabaseServices.Arc = New Autodesk.AutoCAD.DatabaseServices.Arc(ptCenter, radius, startAngle, endAngle)
btr.AppendEntity(arc)
trans.AddNewlyCreatedDBObject(arc, True)
trans.Commit()
End Using