大家好,我是新来的论坛,我已经涉足VBA,到目前为止,我不是专家
我想找出一种分解维度的方法 ;如有任何建议,我们将不胜感激
谢谢,丹
- Sub ExplodeDim()
- Dim sstext As AcadSelectionSet
- Dim blk As AcadBlockReference
- Dim oEnt As AcadEntity
- Dim FilterType(1) As Integer
- Dim FilterData(1) As Variant
- On Error Resume Next
- ThisDrawing.SelectionSets.Item("XDim").Delete
- Set sstext = ThisDrawing.SelectionSets.Add("XDim")
- FilterType(0) = 67
- FilterData(0) = 0
- FilterType(1) = 0
- FilterData(1) = "Dimension"
- sstext.Select acSelectionSetAll, , , FilterType, FilterData
-
- For Each oEnt In sstext
- If TypeOf oEnt Is AcadDimAligned Then
- If oEnt.TextColor = 5 And oEnt.TextOverride " " And oEnt.TextOverride "" Then
- 'Explode Dim here
- End If
- End If
- Next
- End Sub
|