Jogged radius dimensions measure the radius of an object and displays the dimension text with a radius symbol in front of it. You might use a jogged dimension over a radial dimension object when:
折弯半径标注用于测量一个对象的半径并显示一个半径符号显示在标注文字的前面。在下面的情况下,可以使用折弯标注代替半径标注对象:
You create a jogged radius dimenion by creating an instance of a RadialDimensionLarge object. When you create an instance of a RadialDimensionLarge object, its constructors can optionally accept a set parameters. The following parameters can be supplied when you create a new RadialDimensionLarge object:
可以通过创建 RadialDimensionLarge 对象的实例来创建折弯半径标注。在创建一个 RadialDimensionLarge 对象的实例时,它的构造函数可以随意的接受一组参数。当创建一个新的 RadialDimensionLarge 对象时,可以提供下面的参数:
For additional information about creating jogged radius dimensions, see “Create Radial Dimensions” in the AutoCAD User's Guide.
更多关于创建角度标注的详细信息,请参见《AutoCAD 用户手册》中的“创建角度标注”。
This example creates a jogged radius dimension in Model space.
本例在模型空间中创建一个折弯半径标注。
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.ApplicationServices
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Geometry
<CommandMethod("CreateJoggedDimension")> _
Public Sub CreateJoggedDimension()
'' 获得当前数据库 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 a large radius dimension
Dim acRadDimLrg As RadialDimensionLarge = New RadialDimensionLarge()
acRadDimLrg.SetDatabaseDefaults()
acRadDimLrg.Center = New Point3d(-3, -4, 0)
acRadDimLrg.ChordPoint = New Point3d(2, 7, 0)
acRadDimLrg.OverrideCenter = New Point3d(0, 2, 0)
acRadDimLrg.JogPoint = New Point3d(1, 4.5, 0)
acRadDimLrg.JogAngle = 0.707
acRadDimLrg.DimensionStyle = acCurDb.Dimstyle
'' 添加新对象到模型空间和事务中 Add the new object to Model space and the transaction
acBlkTblRec.AppendEntity(acRadDimLrg)
acTrans.AddNewlyCreatedDBObject(acRadDimLrg, 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("CreateJoggedDimension")]
public static void CreateJoggedDimension()
{
// 获得当前数据库 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 a large radius dimension
RadialDimensionLarge acRadDimLrg = new RadialDimensionLarge();
acRadDimLrg.SetDatabaseDefaults();
acRadDimLrg.Center = new Point3d(-3, -4, 0);
acRadDimLrg.ChordPoint = new Point3d(2, 7, 0);
acRadDimLrg.OverrideCenter = new Point3d(0, 2, 0);
acRadDimLrg.JogPoint = new Point3d(1, 4.5, 0);
acRadDimLrg.JogAngle = 0.707;
acRadDimLrg.DimensionStyle = acCurDb.Dimstyle;
// 添加新对象到模型空间和事务中 Add the new object to Model space and the transaction
acBlkTblRec.AppendEntity(acRadDimLrg);
acTrans.AddNewlyCreatedDBObject(acRadDimLrg, true);
// 提交修改并销毁事务 Commit the changes and dispose of the transaction
acTrans.Commit();
}
}