vba 创建匿名组
创建匿名块和匿名组是不一样的, 匿名块用*A或着其他的,而匿名组只要用一个* 就够了.
[本日志由 田草 于 2007-10-10 08:48 PM 编辑]
|
田草 于 2008-07-12 09:30 AM 发表评论:
'创建匿名组,没有则创建,有则序号加一
Function NiMingZu(S As String) As String
Dim G As AcadGroup
Dim n As Long
For Each G In ThisDrawing.Groups
If Left(G.Name, Len(S)) = S Then n = n + 1
Next
NiMingZu = S & n + 1
End Function
Function NiMingZu(S As String) As String
Dim G As AcadGroup
Dim n As Long
For Each G In ThisDrawing.Groups
If Left(G.Name, Len(S)) = S Then n = n + 1
Next
NiMingZu = S & n + 1
End Function
发表评论 - 不要忘了输入验证码哦! |