Public Sub OpenTransactionManager() '' Get the current document and database Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument Dim acCurDb As Database = acDoc.Database '' Start a transaction Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction() '' Open the Block table for read Dim acBlkTbl As BlockTable acBlkTbl = acTrans.GetObject(acCurDb.BlockTableId, OpenMode.ForRead) '' Open the Block table record Model space for read Dim acBlkTblRec As BlockTableRecord acBlkTblRec = acTrans.GetObject(acBlkTbl(BlockTableRecord.ModelSpace), OpenMode.ForRead) '' Step through the Block table record For Each acObjId As ObjectId In acBlkTblRec ' Здесь перебираются все объекты acDoc.Editor.WriteMessage(vbLf & "DXF name: " & acObjId.ObjectClass().DxfName) acDoc.Editor.WriteMessage(vbLf & "ObjectID: " & acObjId.ToString()) acDoc.Editor.WriteMessage(vbLf & "Handle: " & acObjId.Handle.ToString()) acDoc.Editor.WriteMessage(vbLf) If acObjId.ObjectClass().DxfName = "INSERT" Then acObjId необходимо удаление блока Next '' Dispose of the transaction End Using End Sub