CenterMarkSize Property (ActiveX)

Specifies the size of the center mark for radial and diameter dimensions.

Supported platforms: Windows only

Signature

VBA:

object.CenterMarkSize
object

Type: DimDiametric, DimRadial, DimRadialLarge

The objects this property applies to.

Property Value

Read-only: No

Type: Double

A positive real number specifying the size of the center mark or lines.

Remarks

The initial value for this property is 0.0900.

This property is not available if the CenterType property is set to acCenterNone.

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

Examples

VBA:

Sub Example_CenterMarkSize()
    ' This example creates a diametric dimension in model space.
    ' It then changes the type of center for the dimension to
    ' center mark, and adjusts the size of the center mark.
    
    Dim dimObj As AcadDimDiametric
    Dim chordPoint(0 To 2) As Double
    Dim farChordPoint(0 To 2) As Double
    Dim leaderLength As Double
    
    ' Define the dimension
    chordPoint(0) = 5#: chordPoint(1) = 3#: chordPoint(2) = 0#
    farChordPoint(0) = 5#: farChordPoint(1) = 5#: farChordPoint(2) = 0#
    leaderLength = 1#
    
    ' Create the diametric dimension in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimDiametric(chordPoint, farChordPoint, leaderLength)
    ZoomAll
        
    ' Change the center type to center mark and set the size of the center mark
    dimObj.CenterType = acCenterMark
    dimObj.CenterMarkSize = 0.1
    dimObj.Update
    MsgBox "The center mark size is: " & dimObj.CenterMarkSize
    
    dimObj.CenterMarkSize = dimObj.CenterMarkSize * 2
    dimObj.Update
    MsgBox "The center mark size is: " & dimObj.CenterMarkSize
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_CenterMarkSize()
    ;; This example creates a diametric dimension in model space.
    ;; It then changes the type of center for the dimension to
    ;; center mark, and adjusts the size of the center mark.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
  
    ;; Define the dimension
    (setq chordPoint (vlax-3d-point 5 3 0)
          farChordPoint (vlax-3d-point 5 5 0)
          leaderLength 1)
    
    ;; Create the diametric dimension in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj (vla-AddDimDiametric modelSpace chordPoint farChordPoint leaderLength))
    (vla-ZoomAll acadObj)
        
    ;; Change the center type to center mark and set the size of the center mark
    (vla-put-CenterType dimObj acCenterMark)
    (vla-put-CenterMarkSize dimObj 0.1)
    (vla-Update dimObj)
    (alert (strcat "The center mark size is: " (rtos (vla-get-CenterMarkSize dimObj) 2)))
    
    (vla-put-CenterMarkSize dimObj (* (vla-get-CenterMarkSize dimObj) 2))
    (vla-Update dimObj)
    (alert (strcat "The center mark size is: " (rtos (vla-get-CenterMarkSize dimObj) 2)))
)