明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1330|回复: 0

dimension的TextOverride能返回替代文字数据

[复制链接]
发表于 2008-4-1 10:37:00 | 显示全部楼层 |阅读模式
本帖最后由 作者 于 2008-4-1 11:36:11 编辑

TextOverride从字面翻译是---不顾; 使...无效; 藐视; 拒绝制服; 凌驾; 压倒; 推翻(决议)

找了半天,在二次开发教程找到了其意义是指定标注的文字字符串。

在金山词霸中才找到有--取而代之--之意,瞎忙了半天。

以下程序将dimension的Ridial尺寸的所有属性基本列出。

Sub ReturnAcDbRadialDiamension()
 
  '文本类
  Dim DefineAcadMText As AcadMText   'AcDbMText
 
  '尺寸类
  Dim DefineAcadDimRotated As AcadDimRotated ' AcDbRotatedDimension
  Dim DefineAcadDimRadial As AcadDimRadial  'AcDbRadialDimension
  Dim DefineAcadDimDiametric As AcadDimDiametric  'AcDbDiametricDimension
  Dim DefineAcadDimAligned As AcadDimAligned   'AcDbAlignedDimension
  Dim DefineAcadDimAngular As AcadDimAngular  'AcDb2LineAngularDimension
  '平面线性类
  Dim DefineLine As AcadLine, DefineLineArray() As Variant  'AcDbLine
  Dim DefineArc As AcadArc 'AcDbArc
  Dim DefinePolyLine As AcadLWPolyline 'AcDbPolyline
  Dim Ent As AcadEntity
  'Dim DrawingZombieEntity As AcadAttributeReference  'AcDbZombieEntity
  Dim LineCount As Integer
  ''
 
  LineCount = 1
  For Each Ent In ThisDrawing.ModelSpace
    Select Case Ent.ObjectName
      Case "AcDbRadialDimension1"
        Set DefineAcadDimRadial = Ent
        With DefineAcadDimRadial
         
          Debug.Print .AltRoundDistance
          Debug.Print .AltSuppressLeadingZeros
          Debug.Print .AltSuppressTrailingZeros
          Debug.Print .AltSuppressZeroFeet
          Debug.Print .AltSuppressZeroInches
          Debug.Print .AltTextPrefix
          Debug.Print .AltTextSuffix
          Debug.Print .AltTolerancePrecision
          Debug.Print .AltToleranceSuppressLeadingZeros
          Debug.Print .AltToleranceSuppressTrailingZeros
          Debug.Print .AltToleranceSuppressZeroFeet
          Debug.Print .AltUnits
          Debug.Print .AltUnitsFormat
          Debug.Print .AltUnitsPrecision
          Debug.Print .AltUnitsScale
          Debug.Print .ArrowheadBlock
          Debug.Print .ArrowheadSize
          Debug.Print .ArrowheadType
          Debug.Print .CenterMarkSize
          Debug.Print .CenterType
          Debug.Print .DimensionLineColor
          Debug.Print .DimensionLineWeight
          Debug.Print .DimLineSuppress
          Debug.Print .Fit
          Debug.Print .ForceLineInside
          Debug.Print .FractionFormat
          Debug.Print .Layer
          'Debug.Print .LeaderLength
          Debug.Print .LinearScaleFactor
          Debug.Print .Measurement
         
          Debug.Print .PrimaryUnitsPrecision
          Debug.Print .RoundDistance
         
          Debug.Print .SuppressZeroFeet
          Debug.Print .SuppressZeroInches
          Debug.Print .StyleName
         
          '文字部分
          Debug.Print .TextColor
          Debug.Print .TextInside
          Debug.Print .TextInsideAlign
          Debug.Print .TextGap
          Debug.Print .TextHeight
          Debug.Print .TextMovement
          Debug.Print .TextOutsideAlign
          Debug.Print .TextOverride
          Debug.Print .TextPosition(0), .TextPosition(1), .TextPosition(2)
          Debug.Print .TextPrefix
          Debug.Print .TextRotation
          Debug.Print .TextStyle
          Debug.Print .TextSuffix
         
          Debug.Print .ToleranceSuppressZeroFeet
          Debug.Print .ToleranceSuppressZeroInches
          Debug.Print .UnitsFormat
        End With
     Case "AcDbMText"
        Debug.Print Ent.ObjectName
        Set DefineAcadMText = Ent
        Debug.Print TypeName(DefineAcadMText)
       
        Debug.Print DefineAcadMText.TextString
        With DefineAcadMText
          Debug.Print .ObjectID
          Debug.Print .TextString
        End With

       
    End Select
  Next Ent
  'Debug.Print "", LineCount
End Sub

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-26 10:40 , Processed in 0.159728 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表