每个标注都可以替代该标注的标注样式中的设置值。以下特性可用于大多数标注对象:
- AltRoundDistance
- AngleFormat
- Arrowhead1Block、Arrowhead2Block
- Arrowhead1Type、Arrowhead2Type
- ArrowheadSize
- CenterMarkSize
- CenterType
- DecimalSeparator
- DimensionLineColor
- DimensionLineWeight
- DimLine1Suppress、DimLine2Suppress
- DimLineInside
- ExtensionLineColor
- ExtensionLineExtend
- ExtensionLineOffset
- ExtensionLineWeight
- ExtLine1EndPoint、ExtLine2EndPoint
- ExtLine1StartPoint、ExtLine2StartPoint
- ExtLine1Suppress、ExtLine2Suppress
- 拟合
- ForceLineInside
- FractionFormat
- HorizontalTextPosition
- LinearScaleFactor
- PrimaryUnitsPrecision
- SuppressLeadingZeros、SuppressTrailingZeros
- SuppressZeroFeet、SuppressZeroInches
- TextColor
- TextGap
- TextHeight
- TextInside
- TextInsideAlign
- TextMovement
- TextOutsideAlign
- TextPosition
- TextPrecision
- TextPrefix
- TextRotation
- TextSuffix
- ToleranceDisplay
- ToleranceHeightScale
- ToleranceJustification
- ToleranceLowerLimit
- TolerancePrecision
- ToleranceSuppressLeadingZeros
- ToleranceSuppressTrailingZeros
- ToleranceUpperLimit
- UnitsFormat
- VerticalTextPosition
本例在模型空间中创建对齐标注,并使用 TextSuffix 特性让用户来修改标注的文字后缀。
Sub Ch5_AddTextSuffix()
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
Dim suffix As String
' 定义标注point1(0) = 0: point1(1) = 5: point1(2) = 0point2(0) = 5: point2(1) = 5: point2(2) = 0location(0) = 5: location(1) = 7: location(2) = 0' 在模型空间中创建对齐标注对象Set dimObj = ThisDrawing.ModelSpace. _AddDimAligned(point1, point2, location)ThisDrawing.Application.ZoomAll' 允许用户修改标注的文字后缀suffix = InputBox("Enter a new text suffix for the dimension" _, "Set Dimension Suffix", ":SUFFIX")' 将修改应用到标注dimObj.TextSuffix = suffixThisDrawing.Regen acAllViewportsEnd Sub