寸法値を寸法補助線の内側に記入するかどうかを指定します。
サポートされているプラットフォーム: Windows のみ
VBA:
object.TextInside
タイプ: Dim3PointAngular、DimAligned、DimAngular、DimArcLength、DimDiametric、DimRadial、DimRadialLarge、DimRotated
このプロパティが適用されるオブジェクト。
読み込み専用: いいえ
タイプ: ブール型
このプロパティの初期値は True です。
このプロパティを False に設定すると、結果はさまざまになります。長さ寸法と角度寸法の場合、AutoCAD は十分な空きがある場合にのみ寸法補助線の内側に寸法値を記入します。円または円弧の内側にフィットしない半径寸法および直径寸法の場合、このプロパティは効果がなく、寸法値は常に円または円弧の外側に記入されます。
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"))
)