代码:
Using Trans As Transaction = DB.TransactionManager.StartTransaction
Dim groupDict As DBDictionary = Trans.GetObject(DB.GroupDictionaryId, OpenMode.ForWrite)
For Each Ent As DBDictionaryEntry In groupDict
If Ent.Key.Substring(0, 1) = "*" Then
Dim grpObj As Group = Trans.GetObject(groupDict.GetAt(ent.Key), OpenMode.ForWrite)
grpObj.Erase()
End If
Next
Trans.Commit()
End Using