Try this one I wrote for my own needs:
Public Sub BlockSymbolsToTable()
Dim doc As Document = AcadApp.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Dim db As Database = doc.Database
Using trans As Transaction = db.TransactionManager.StartTransaction()
Try
Dim blkTbl As BlockTable = CType(trans.GetObject(db.BlockTableId, OpenMode.ForRead), BlockTable)
Dim blkTblRec As BlockTableRecord = CType(trans.GetObject(blkTbl(BlockTableRecord.ModelSpace), OpenMode.ForWrite), BlockTableRecord)
Dim stId As ObjectId = AcadTableUtilities.makeTableStyle
Dim ptable As Table = Nothing
ptable = New Table
ptable.Position = New Point3d(0, 0, 0)
ptable.InsertRows(0, 3.0, 1)
ptable.InsertColumns(0, 7.5, 3)
ptable.SetTextHeight(0, 0, 1.5)
ptable.SetAlignment(0, 0, CellAlignment.MiddleCenter)
ptable.SetTextString(0, 0, "Drawing Block Images")
Dim reg As TableRegion = New TableRegion(0, 0, 0, 3)
ptable.MergeCells(reg)
ptable.TableStyle = stId
ptable.SetColumnWidth(0, 8.0)
ptable.SetColumnWidth(1, 36.0)
ptable.SetColumnWidth(2, 40.0)
ptable.SetColumnWidth(3, 30.0)
ptable.SetTextHeight(1, 0, 1.5)
ptable.SetTextHeight(1, 1, 1.5)
ptable.SetTextHeight(1, 2, 1.5)
ptable.SetTextHeight(1, 3, 1.5)
ptable.SetTextString(1, 0, "Image")
ptable.SetTextString(1, 1, "Block Name")
ptable.SetTextString(1, 2, "Description")
ptable.SetTextString(1, 3, "Remarks")
Dim irow As Long = 2
Dim btiter As IEnumerator = blkTbl.GetEnumerator
While btiter.MoveNext
Dim blkId As ObjectId = btiter.Current
Dim btr As BlockTableRecord = trans.GetObject(blkId, OpenMode.ForRead)
If btr.IsAnonymous = False And _
btr.IsLayout = False And _
btr.IsFromExternalReference = False And _
btr.IsFromOverlayReference = False Then
Dim bname As String = btr.Name
ed.WriteMessage(vbCr & bname)
ptable.InsertRows(irow, 2.5, 1)
ptable.GenerateLayout()
ptable.SetBlockTableRecordId(irow, 0, blkId, True)
ptable.SetTextString(irow, 1, bname)
ptable.SetTextString(irow, 2, "Here is must be description")
ptable.SetAlignment(irow, 1, CellAlignment.MiddleCenter)
ptable.SetAlignment(irow, 2, CellAlignment.MiddleCenter)
ptable.SetAlignment(irow, 3, CellAlignment.MiddleCenter)
ptable.SetTextHeight(irow, 0, 1.5)
ptable.SetTextHeight(irow, 1, 1.5)
ptable.SetTextHeight(irow, 2, 1.5)
ptable.SetTextHeight(irow, 3, 1.5)
irow += 1
End If
End While
blkTblRec.AppendEntity(ptable)
trans.AddNewlyCreatedDBObject(ptable, True)
ptable.RecomputeTableBlock(True)
ed.Regen()
ptable.Dispose()
blkTbl.Dispose()
blkTblRec.Dispose()
Catch ex As System.Exception
MsgBox(ex.StackTrace)
End Try
trans.Commit()
trans.Dispose()
End Using
End Sub
~'J'~