- 积分
- 1269
- 明经币
- 个
- 注册时间
- 2016-10-25
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Sub demo()
Dim varpt As Variant '插入点
Dim br As AcadBlockReference '定义插入块返回对象
varpt = ThisDrawing.Utility.GetPoint '选择输出的位置
Dim num1 As Integer '循环次数定义
num1 = ThisDrawing.Blocks.Count - 1 '循环次数赋值有几个块,就循环几次
Dim i As Integer '循环
Dim name1 As String ' 块名储存
For i = 4 To num1'进入循环
name1 = ThisDrawing.Blocks.Item(i).Name '块名赋值
Set br = ThisDrawing.ModelSpace.InsertBlock(varpt, name1, 1, 1, 1, 0) '在指定位置插入块
varpt(1) = varpt(1) - 10 '插入点y值向下移动10个单位继续插入
Next i
End Sub
|
|