- 积分
- 232
- 明经币
- 个
- 注册时间
- 2011-5-27
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
插入块后,可以直接炸开当前插入块吗?- On Error Resume Next
- If ListView2.ListItems.Count = 0 Then
-
- MsgBox "请先选择图纸!"
- Exit Sub
- Else
- Set acadApp = GetObject(, "AutoCAD.Application.18")
- If Err Then
- Err.Clear
- ' 创建一个新的AutoCAD应用程序对象
- Set acadApp = CreateObject("AutoCAD.Application.18")
- If Err Then
- Exit Sub
- End If
- End If
-
- ' 显示AutoCAD应用程序
- acadApp.Visible = True
- acadApp.WindowState = acMax
- Dim i As Integer
- For i = 1 To ListView2.ListItems.Count + 1
-
- acadApp.Documents.Open ListView2.ListItems(i).SubItems(1) & "" & ListView2.ListItems.Item(i)
-
- Dim lujing As String
- lujing = Text3.Text
- Dim d(2) As Double
- d(0) = Val(Text1.Text)
- d(1) = Val(Text2.Text)
- d(2) = 0
- acadApp.ActiveDocument.ModelSpace.InsertBlock d, lujing, 1, 1, 1, 0
-
- '这里能否增加一句,直接炸开当前插入块
-
- acadApp.Application.ZoomExtents
- acadApp.Documents.Close
- Next i
- End If
- 'acadApp.Quit
- MsgBox "OK! ^_^"
|
|