TextMovement プロパティ(ActiveX)

寸法値が移動したときの記入方法を指定します。

サポートされているプラットフォーム: Windows のみ

構文と要素

VBA:

object.TextMovement
object

タイプ: Dim3PointAngularDimAlignedDimAngularDimArcLengthDimDiametricDimensionDimOrdinateDimRadialDimRadialLargeDimRotated

このプロパティが適用されるオブジェクト。

プロパティの値

読み込み専用: いいえ

タイプ: acDimTextMovement 列挙型

注意

このプロパティの初期値は acMoveTextNoLeader です。

注: このプロパティは、指定された寸法でシステム変数 DIMTMOVE[寸法値移動規則]の値を変更します。

VBA:

Sub Example_TextMovement()
    ' This example creates two aligned dimensions in model space and
    ' sets the TextMovement property of each one differently to allow
    ' the user to see the differences this property makes when moving
    ' dimension text
    '
    ' To see the effects of this property:
    ' 1) Run this sample
    ' 2) Enter the drawing and move the dimension text of the leftmost object
    '    on the screen with the mouse or keyboard.
    ' 3) Notice the position of the dimension lines
    ' 4) Repeat with the rightmost object
   
    Dim dimObj1 As AcadDimAligned, dimObj2 As AcadDimAligned
    Dim point1(0 To 2) As Double, point2(0 To 2) As Double
    Dim point3(0 To 2) As Double, point4(0 To 2) As Double
    Dim location1(0 To 2) As Double, location2(0 To 2) As Double
        
    ' Define the two dimensions
    point1(0) = 5: point1(1) = 5: point1(2) = 0
    point2(0) = 6: point2(1) = 5: point2(2) = 0
    location1(0) = 5: location1(1) = 7: location1(2) = 0
    
    point3(0) = 7: point3(1) = 5: point3(2) = 0
    point4(0) = 8: point4(1) = 5: point4(2) = 0
    location2(0) = 5: location2(1) = 7: location2(2) = 0
    
    ' Create the aligned dimension objects in model space
    Set dimObj1 = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, location1)
    Set dimObj2 = ThisDrawing.ModelSpace.AddDimAligned(point3, point4, location2)
    
    ThisDrawing.Application.ZoomAll

    ' Set the text movement of the new dimensions to different values
    dimObj1.TextMovement = acMoveTextNoLeader
    location1(0) = 5.5: location1(1) = 7.5: location1(2) = 0
    dimObj1.TextPosition = location1
    dimObj2.TextMovement = acDimLineWithText
    location2(0) = 7.5: location2(1) = 7.5: location2(2) = 0
    dimObj2.TextPosition = location2
       
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_TextMovement()
    ;; This example creates two aligned dimensions in model space and
    ;; sets the TextMovement property of each one differently to allow
    ;; the user to see the differences this property makes when moving
    ;; dimension text
    ;;
    ;; To see the effects of this property:
    ;; 1) Run this sample
    ;; 2) Enter the drawing and move the dimension text of the leftmost object
    ;;    on the screen with the mouse or keyboard.
    ;; 3) Notice the position of the dimension lines
    ;; 4) Repeat with the rightmost object
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))
          
    ;; Define the two dimensions
    (setq point1 (vlax-3d-point 5 5 0)
          point2 (vlax-3d-point 6 5 0)
          location1 (vlax-3d-point 5 7 0))

    (setq point3 (vlax-3d-point 7 5 0)
          point4 (vlax-3d-point 8 5 0)
          location2 (vlax-3d-point 5 7 0))
    
    ;; Create the aligned dimension objects in model space
    (setq modelSpace (vla-get-ModelSpace doc))
    (setq dimObj1 (vla-AddDimAligned modelSpace point1 point2 location1))
    (setq dimObj2 (vla-AddDimAligned modelSpace point3 point4 location2))
    (vla-ZoomAll acadObj)

    ;; Set the text movement of the new dimensions to different values
    (vla-put-TextMovement dimObj1 acMoveTextNoLeader)
    (setq location1 (vlax-3d-point 5.5 7.5 0))
    (vla-put-TextPosition dimObj1 location1)
    (vla-put-TextMovement dimObj2 acDimLineWithText)
    (setq location2 (vlax-3d-point 7.5 7.5 0))
    (vla-put-TextPosition dimObj2 location2)
)