ArrowheadType Property (ActiveX)

Specifies the type of arrowhead for the radial dimension, leader, or mleader.

Supported platforms: Windows only

Signature

VBA:

object.ArrowheadType
object

Type: DimRadial, DimRadialLarge, Leader, MLeader, MLeaderLeader

The objects this property applies to.

Property Value

Read-only: No

Type: acDimArrowheadType enum

Remarks

The initial value for this property is acArrowDefault.

When you use the ArrowheadBlock property to specify a block to use as a custom arrowhead, this property will be set to acArrowUserDefined.

Note: This property overrides the value of the DIMLDRBLK system variable for the given dimension.

Examples

VBA:

Sub Example_ArrowHeadType()
    ' This example creates a Leader object in model space with an associated Annotation
    ' and then alters the visible appearance (shape) of its arrowhead
    ' using the ArrowHeadType property

    Dim leaderObj As AcadLeader, MTextObj As AcadMText
    Dim points(0 To 8) As Double, insertionPoint(0 To 2) As Double, iTextWidth As Double
    Dim leaderType As Integer
    Dim annotationObject As Object
    Dim textString As String
    
    ' Define the new MText object
    textString = "Hello, World."
    insertionPoint(0) = 5: insertionPoint(1) = 5: insertionPoint(2) = 0
    iTextWidth = 2
    
    ' Create the MText object in model space
    Set MTextObj = ThisDrawing.ModelSpace.AddMText(insertionPoint, iTextWidth, textString)
    
    ' Data for Leader
    points(0) = 0: points(1) = 0: points(2) = 0
    points(3) = 4: points(4) = 4: points(5) = 0
    points(6) = 4: points(7) = 5: points(8) = 0
    leaderType = acLineWithArrow
       
    ' Create the Leader object in model space and Associate new MText object
    ' with new Leader by making the MText object the annotation for the Leader
    Set annotationObject = MTextObj
    Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType)
    ThisDrawing.Application.ZoomAll

    ' Read and display current arrowhead type
    MsgBox "The arrowhead type for this object is: " & leaderObj.ArrowheadType

    ' Alter the arrowhead type property for this object
    leaderObj.ArrowheadType = acArrowBoxBlank
    ThisDrawing.Application.ZoomAll
    
    ' Read and display current arrowhead type
    MsgBox "The arrowhead type for this object is now set to: " & leaderObj.ArrowheadType
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_ArrowHeadType()
    ;; This example creates a Leader object in model space with an associated Annotation
    ;; and then alters the visible appearance (shape) of its arrowhead
    ;; using the ArrowHeadType property
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    ;; Define the new MText object
    (setq insertionPoint (vlax-3d-point 5 5 0)
          textString "Hello, World."
	  iTextWidth 2)
    
    ;; Create the MText object in model space
    (setq modelSpace (vla-get-ModelSpace doc))  
    (setq MTextObj (vla-AddMText modelSpace insertionPoint iTextWidth textString))
    
    ;; Data for Leader
    (setq points (vlax-make-safearray vlax-vbDouble '(0 . 8)))
    (vlax-safearray-fill points '(0 0 0
				  4 4 0
				  4 5 0
				 )
    )
    (setq leaderType acLineWithArrow)
       
    ;; Create the Leader object in model space and Associate new MText object
    ;; with new Leader by making the MText object the annotation for the Leader
    (setq annotationObject MTextObj)
    (setq leaderObj (vla-AddLeader modelSpace points annotationObject leaderType))
    (vla-ZoomAll acadObj)

    ;; Read and display current arrowhead type
    (alert (strcat "The arrowhead type for this object is: " (itoa (vla-get-ArrowheadType leaderObj))))

    ;; Alter the arrowhead type property for this object
    (vla-put-ArrowheadType leaderObj acArrowBoxBlank)
    (vla-ZoomAll acadObj)
    
    ;; Read and display current arrowhead type
    (alert (strcat "The arrowhead type for this object is now set to: " (itoa (vla-get-ArrowheadType leaderObj))))
)