在autocad中如何用VBA修改现有的标注?(特别是如何找到要修改的标注?然后用TextO
在autocad中如何用VBA修改现有的标注?(特别是如何找到要修改的标注?然后用TextOverride去修改它?)在autocad中如何用VBA修改现有的标注?(特别是如何找到要修改的标注?然后用TextOverride去修改它?) 本帖最后由 作者 于 2008-1-13 10:42:41 编辑你可以先遍历标注,然后用SELECT CASE 通过 特定的TEXTOVERRIDE 选定要改的标注,然后修改其TEXTOVERRIDE属性就行
Dim ft(0) As Integer
Dim fd(0) As Variant
Dim sset As AcadSelectionSet
If AcadApp.ActiveDocument.SelectionSets.Count = 0 Then
Set sset = AcadApp.ActiveDocument.SelectionSets.Add("ss1")
Else
Set sset = AcadApp.ActiveDocument.SelectionSets.Item(0)
sset.Clear
End If
fd(0) = "DIMENSION"
sset.Select acSelectionSetAll, , , ft, fd
If sset.Count = 0 Then Exit Sub
Dim Ds As AcadDimension
For Each Ds In sset
If Ds.StyleName = "AA" Then
Select Case Left(Ds.TextOverride, 3)
Case "AA"
Ds.TextOverride = "123456"
........................................
页:
[1]