AddDimArc Method (ActiveX)

Creates an arc length dimension for an arc.

Supported platforms: Windows only

Signature

VBA:

RetVal = object.AddDimArc(ArcCenter, FirstEndPoint, SecondEndPoint, ArcPoint)
object

Type: Block, ModelSpace, PaperSpace

The objects this method applies to.

ArcCenter

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the center of the arc.

FirstEndPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the point through which the first extension line passes.

SecondEndPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying the point through which the second extension line passes.

ArcPoint

Access: Input-only

Type: Variant (three-element array of doubles)

The 3D WCS coordinates specifying a point on the arc.

Return Value (RetVal)

Type: DimArcLength

The newly created arc length dimension.

Remarks



The ArcCenter is the center of the arc being dimensioned. FirstEndPoint and SecondEndPoint are the points through which the two extension lines pass.

Examples

VBA:

Sub Example_AddDimArc()
    Dim PI As Double: PI = 3.141592
    Dim oMS As AcadModelSpace
    Set oMS = ThisDrawing.ModelSpace

    Dim ptCenter(2) As Double
    Dim oA As AcadArc
    Set oA = oMS.AddArc(ptCenter, 10, PI / 3, PI * 3 / 4)
    
    Dim ptArcPoint(2) As Double
    ptArcPoint(0) = 0: ptArcPoint(1) = 15
    
    Dim oAcadDimArcLength As AcadDimArcLength
    Set oAcadDimArcLength = oMS.AddDimArc(oA.Center, oA.startPoint, oA.endPoint, ptArcPoint)
    
    Update
    ZoomExtents
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_AddDimArc()
    ;; This example creates an arc and arc length dimension in model space.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    (setq modelSpace (vla-get-ModelSpace doc))

    ;; Define the arc
    (setq center (vlax-3d-point 0 0 0))

    ;; Create the arc in model space
    (setq arc (vla-AddArc modelSpace center 10 (/ PI 3) (/ (* PI 3) 4)))
    
    ;; Define the arc length dimension
    (setq arcPoint (vlax-3d-point 0 15 0)
          startPoint (vla-get-StartPoint arc)
          endPoint (vla-get-EndPoint arc))
  
    ;; Create the arc length dimension in model space
    (setq dimArcLength (vla-AddDimArc modelSpace center startPoint endPoint arcPoint))
    (vla-ZoomExtents acadObj)
)