Arc length dimensions measure the length along an arcand displays the dimension text with an arc symbol that is either above or proceeds it. You might use an arc length dimension when you need to dimension the actual length of an arc instead of just distance between its start and end points.
You create an arc length radius dimenion by creating an instance of an ArcDimension object. When you create an instance of an ArcDimension object, it requires a set of paramters that define the dimension. The following parameters must be supplied when you create a new ArcDimension object:
For additional information about creating arc length dimensions, see “Create Arc Length Dimensions” in the AutoCAD User's Guide.
Create an arc length dimension
This example creates an arc length dimension in Model space.
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
<CommandMethod("CreateArcLengthDimension")> _
Public Sub CreateArcLengthDimension()
'' Get the current database
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acDoc.Database
'' Start a transaction
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
'' Open the Block table for read
Dim acBlkTbl As BlockTable
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, _
OpenMode.ForRead)
'' Open the Block table record Model space for write
Dim acBlkTblRec As BlockTableRecord
acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), _
OpenMode.ForWrite)
'' Create an arc length dimension
Dim acArcDim As ArcDimension = New ArcDimension(New Point3d(4.5, 1.5, 0), _
New Point3d(8, 4.25, 0), _
New Point3d(0, 2, 0), _
New Point3d(5, 7, 0), _
"<>", _
acCurDb.Dimstyle)
'' Add the new object to Model space and the transaction
acBlkTblRec.AppendEntity(acArcDim)
acTrans.AddNewlyCreatedDBObject(acArcDim, True)
'' Commit the changes and dispose of the transaction
acTrans.Commit()
End Using
End Sub
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
[CommandMethod("CreateArcLengthDimension")]
public static void CreateArcLengthDimension()
{
// Get the current database
Document acDoc = Application.DocumentManager.MdiActiveDocument;
Database acCurDb = acDoc.Database;
// Start a transaction
using (Transaction acTrans = acCurDb.TransactionManager.StartTransaction())
{
// Open the Block table for read
BlockTable acBlkTbl;
acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId,
OpenMode.ForRead) as BlockTable;
// Open the Block table record Model space for write
BlockTableRecord acBlkTblRec;
acBlkTblRec = acTrans.GetObject(acBlkTbl[BlockTableRecord.ModelSpace],
OpenMode.ForWrite) as BlockTableRecord;
// Create an arc length dimension
ArcDimension acArcDim = new ArcDimension(new Point3d(4.5, 1.5, 0),
new Point3d(8, 4.25, 0),
new Point3d(0, 2, 0),
new Point3d(5, 7, 0),
"<>",
acCurDb.Dimstyle);
// Add the new object to Model space and the transaction
acBlkTblRec.AppendEntity(acArcDim);
acTrans.AddNewlyCreatedDBObject(acArcDim, true);
// Commit the changes and dispose of the transaction
acTrans.Commit();
}
}