- 积分
- 5359
- 明经币
- 个
- 注册时间
- 2004-7-13
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
楼主 |
发表于 2004-9-22 18:10:00
|
显示全部楼层
要插入该匿名块 Set BlkObj = ThisDrawing.ModelSpace.InsertBlock(P, GetUNBlock, 1, 1, 1, 0)
程序修改如下:
Public Function GetUNBlock() As String '此处修改了,该为获取块名
Dim BlockObj As AcadBlock
Dim n As Integer
For Each BlockObj In ThisDrawing.Blocks
If Left(BlockObj.Name, 1) = "*" Then
If BlockObj.Name <> "*Model_Space" And Left(BlockObj.Name, 12) <> "*Paper_Space" Then
If Mid(BlockObj.Name, 3) >= n Then
n = Mid(BlockObj.Name, 3)
GetUNBlock = BlockObj.Name '此处修改了
End If
End If
End If
Next
Set BlockObj = Nothing
End Function |
|