TextInside Property (ActiveX)

Specifies if the dimension text is to be drawn inside the extension lines.

Supported platforms: Windows only

Signature

VBA:

object.TextInside
object

Type: Dim3PointAngular, DimAligned, DimAngular, DimArcLength, DimDiametric, DimRadial, DimRadialLarge, DimRotated

The objects this property applies to.

Property Value

Read-only: No

Type: Boolean

Remarks

The initial value for this property is True.

Setting this property to False has varying results. For linear and angular dimensions, AutoCAD places text inside the extension lines if there is sufficient room. For radius and diameter dimensions that do not fit inside the circle or arc, this property has no effect and always forces the text outside the circle or arc.

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

Examples

VBA:

Sub Example_TextInside()
    ' This example creates an aligned dimension in model space and
    ' allows the user to toggle, forcing the dimension text between the extension lines
    ' using the TextInside property

    Dim dimObj As AcadDimAligned
    Dim point1(0 To 2) As Double, point2(0 To 2) As Double
    Dim location(0 To 2) As Double
    Dim CurrentValue As String
    
    ' Define the dimension
    point1(0) = 5: point1(1) = 5: point1(2) = 0
    point2(0) = 5.5: point2(1) = 5: point2(2) = 0
    location(0) = 5: location(1) = 7: location(2) = 0
    
    ' Create an aligned dimension object in model space
    Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, location)
    ThisDrawing.Application.ZoomAll

Toggle:
    Select Case MsgBox("Press OK to toggle forcing the dimension text inside the extension lines", vbOKCancel)
        Case vbOK
            ' Toggle forcing the dimension text inside the extension lines
            dimObj.TextInside = Not (dimObj.TextInside)
            ThisDrawing.Regen acAllViewports
            
            ' Read and display the new dimension TextInside value
            CurrentValue = IIf(dimObj.TextInside, "is now", "is not")
            MsgBox "The dimension text " & CurrentValue & " forced inside the extension lines"
        
        Case vbCancel
            Exit Sub
    End Select
    
    GoTo Toggle
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_TextInside()
    ;; This example creates an aligned dimension in model space and
    ;; allows the user to toggle, forcing the dimension text between the extension lines
    ;; using the TextInside property
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
    
    ;; Define the dimension
    (setq point1 (vlax-3d-point 5 5 0)
          point2 (vlax-3d-point 5.5 5 0)
          location (vlax-3d-point 5 7 0))
    
    ;; Create an aligned dimension object in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj (vla-AddDimAligned modelSpace point1 point2 location))
    (vla-ZoomAll acadObj)

    ;; Toggle forcing the dimension text inside the extension lines
    (vla-put-TextInside dimObj (if (= (vla-get-TextInside dimObj) :vlax-true) :vlax-false :vlax-true))
    (vla-Regen doc acAllViewports)
            
    ;; Read and display the new dimension TextInside value
    (setq CurrentValue (if (= (vla-get-TextInside dimObj) :vlax-true) "is now" "is not"))
    (alert (strcat "The dimension text " CurrentValue " forced inside the extension lines"))

    ;; Toggle forcing the dimension text inside the extension lines
    (vla-put-TextInside dimObj (if (= (vla-get-TextInside dimObj) :vlax-true) :vlax-false :vlax-true))
    (vla-Regen doc acAllViewports)
            
    ;; Read and display the new dimension TextInside value
    (setq CurrentValue (if (= (vla-get-TextInside dimObj) :vlax-true) "is now" "is not"))
    (alert (strcat "The dimension text " CurrentValue " forced inside the extension lines"))
)