- 积分
- 58
- 明经币
- 个
- 注册时间
- 2016-5-10
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
- Private Sub CommandButton6_Click()
- Dim i&
- Dim insertionPnt(0 To 2) As Double
- Dim blockRefObj As AcadBlockReference
- Dim blockRefObj1 As AcadBlockReference
- Dim Obj1 As Object
- On Error Resume Next
- insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#
- Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "C:\Program Files (x86)\AutoCAD 2007\块.dwg", 1#, 1#, 1#, 0)’在第二个dwg文档内插入失败。除非关闭所有CAD。
- For Each Obj1 In ThisDrawing.ModelSpace
- If Obj1.Name = "块" Then Obj1.Delete
- Next
- Set blockRefObj = Nothing
- CR:
- i = i + 1
- Set blockRefObj1 = ThisDrawing.ModelSpace.InsertBlock(ThisDrawing.Utility.GetPoint, "超级数据拾取", 1#, 1#, 1#, 0)
- Dim varAttributes As Variant
- varAttributes = blockRefObj1.GetAttributes
- varAttributes(0).TextString = i & "#"
- If CheckKey(VK_ESCAPE) = True Then
- varAttributes(0).TextString = i - 1 & "#"
- Exit Sub
- End If
- 'If CheckKey(VK_SHIFT) = True Then
- GoTo CR
- 'End If
- End Sub
该贴已经同步到 尼玛的臭屌丝的微博 |
|