- 积分
- 6409
- 明经币
- 个
- 注册时间
- 2017-8-16
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
1、VBA 用了标注,怎么编辑标注的文字内容,比如 ‘900’ 改成 “长度900”
Set x = ThisDrawing.ModelSpace.AddDimAligned(pt1, pt2, pt3)
2、选择的时候第一遍能选中区域内的内容,循环第二遍不能选中
Dim pt1(2) As Double, pt2(2) As Double
pt1(0) = -1500
pt1(1) = -1500
pt1(2) = 0
pt2(0) = 3200
pt2(1) = 3200
pt2(2) = 0
On Error Resume Next
If Not IsNull(ThisDrawing.SelectionSets.Item(na)) Then
Set y = ThisDrawing.SelectionSets.Item(na)
y.Delete
End If
Set y = ThisDrawing.SelectionSets.Add(na)
y.Select acSelectionSetCrossing, pt1, pt2
Dim ww As AcadBlock
Set ww = ThisDrawing.Blocks.Add(pt, na)
ReDim x(y.Count - 1)
Dim i As Integer
For i = 0 To y.Count - 1
Set x(i) = y.Item(i)
Next i
ThisDrawing.CopyObjects x, ww
Dim obj As AcadObject
For Each obj In ThisDrawing.ModelSpace
obj.Delete
Next
y.Delete
|
|