AddDimRadial Method (ActiveX)

Creates a radial dimension for the selected object at the given location.

Supported platforms: Windows only

Signature

VBA:

RetVal = object.AddDimRadial(Center, ChordPoint, LeaderLength)
object

Type: Block, ModelSpace, PaperSpace

The objects this method applies to.

Center

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the center point on the circle or arc.

ChordPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the point on the circle or arc to attach the leader line.

LeaderLength

Access: Input-only

Type: Double

The positive value representing the length from the ChordPoint to the annotation text or dogleg.

Return Value (RetVal)

Type: DimRadial

The newly created radius dimension object.

Remarks

Different types of radial dimensions are created depending on the size of the circle or arc, the TextPosition property and the values in the AutoCAD DIMUPT, DIMTOFL, DIMFIT, DIMTIH, DIMTOH, DIMJUST, and DIMTAD dimension system variables. (System variables can be queried or set using the GetVariable and SetVariable methods.)

For horizontal dimension text, if the angle of the dimension line is more than 15 degrees from horizontal, and is outside the circle or arc, AutoCAD draws a hook line, also called a landing or dogleg. The hook line is one arrowhead long, and is placed next to the dimension text, as shown in the first two illustrations.



This method uses length as the distance from the ChordPoint out to where the dimension will do a horizontal dogleg to the annotation text (or stop if no dogleg is necessary).

The LeaderLength setting will only be used during the creation of the dimension (and even then only if the dimension is set to use the default text position value). After the dimension has been closed for the first time, changing the LeaderLength value will not affect how the dimension displays, but the new setting will be stored and will show up in DXF, LISP, and ARX.

Examples

VBA:

Sub Example_AddDimRadial()
    ' This example creates a radial dimension in model space.
    
    Dim dimObj As AcadDimRadial
    Dim center(0 To 2) As Double
    Dim chordPoint(0 To 2) As Double
    Dim leaderLen As Integer
    
    ' Define the dimension
    center(0) = 0#: center(1) = 0#: center(2) = 0#
    chordPoint(0) = 5#: chordPoint(1) = 5#: chordPoint(2) = 0#
    leaderLen = 5
    
    ' Create the radial dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimRadial(center, chordPoint, leaderLen)
    ZoomAll
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_AddDimRadial()
    ;; This example creates a radial dimension in model space.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Define the dimension
    (setq center (vlax-3d-point 0 0 0)
          chordPoint (vlax-3d-point 5 5 0)
          leaderLen 5)
    
    ;; Create the radial dimension in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj (vla-AddDimRadial modelSpace center chordPoint leaderLen))
    (vla-ZoomAll acadObj)
)