>>This function creates a new block table record in the database executing this function. This new block table record is given the name pointed to by destinationBlockName. Then, each entity in the block table record whose name is sourceBlockName and which resides in the database pointed to by dataBase is copied into the new block table record.
I'd recommend you use Insert for copying blocks from one database to another unless there is a very good reason why its unsuitable.
Once you've instered the BlockTableRecord, you have to add a BlockReference to the drawing to display it. Here's a copy of a DevNote from the ADN website showing how to insert a BTR+BR in the drawing (albeit using a different version of Database.Insert, and omitting code to add AttributeReferences):
Published date: 2009-06-04
ID: TS87078
Applies to:
AutoCAD® 2010
AutoCAD® 2009
AutoCAD® 2008
AutoCAD® 2007
AutoCAD® 2006
Issue
How to insert external dwg file as a block in current drawing using VB.NET?
Solution
If you want insert the external dwg file into current database, first you can use dbDwg.readDwgFile(...) and use id = db.Insert("test", dbDwg, False) ,test is the block name, then you can use Dim blkRef As New BlockReference(ptInsert, id) to create a new block reference and append it to the currrent database. The following is sample code snippet.
<CommandMethod("InsertBlk")> _
Public Sub InsertBlk()
Dim db As Database
db = HostApplicationServices.WorkingDatabase()
Dim ed As Editor
ed = Application.DocumentManager.MdiActiveDocument.Editor
Dim trans As Transaction
trans = db.TransactionManager.StartTransaction
Try
Dim bt As BlockTable = trans.GetObject(db.BlockTableId, OpenMode.ForRead)
Dim btr As BlockTableRecord
btr = trans.GetObject(bt.Item(BlockTableRecord.ModelSpace), OpenMode.ForWrite)
Dim id As ObjectId
If bt.Has("test") Then
Dim btrSrc As BlockTableRecord
btrsrc=trans.GetObject(bt.Item("test"), OpenMode.ForRead)
id = btrSrc.Id
Else
Dim dbDwg As New Database(False, True)
dbDwg.ReadDwgFile("C:\\TEST.dwg", IO.FileShare.Read, True, "")
id = db.Insert("test", dbDwg, True)
dbDwg.Dispose()
End If
Dim opPt As New PromptPointOptions("pick the insert point of the blk")
Dim resPt As PromptPointResult
resPt = ed.GetPoint(opPt)
If resPt.Status <> PromptStatus.OK Then
MsgBox("fail to get the insert point")
Exit Sub
End If
Dim ptInsert As Point3d
ptInsert = resPt.Value
Dim blkRef As New BlockReference(ptInsert, id)
btr.AppendEntity(blkRef)
trans.AddNewlyCreatedDBObject(blkRef, True)
trans.Commit()
Catch
MsgBox("fail to read dwg file and insert in current database ")
Finally
trans.Dispose()
End Try
End Sub