可以使用 TextOverride 属性替换显示的维度值。使用此属性,可以完全替换维度的显示值,也可以将文本追加到该值。 修改尺寸文本本示例将一些文本追加到值中,以便同时显示字符串和维度值。 Sub Ch5_OverrideDimensionText() Dim dimObj As AcadDimAligned Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim location(0 To 2) As Double ' Define the dimension point1(0) = 5#: point1(1) = 3#: point1(2) = 0# point2(0) = 10#: point2(1) = 3#: point2(2) = 0# location(0) = 7.5: location(1) = 5#: location(2) = 0# ' Create an aligned dimension object in model space Set dimObj = ThisDrawing.ModelSpace. _ AddDimAligned(point1, point2, location) ' Change the text string for the dimension dimObj.TextOverride = "The value is <>" dimObj.Update End Sub 父主题: |
|Archiver|CAD开发者社区 ( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-1-8 19:35
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.