If it has a different attribute (partnumber) it is fine, the problem comes in when there are multiples of the same part(block). In this case each block will be a part in the drawing. If I use this code it will bring all the blocks in as xref's each referencing the correct drawing but their positions are way off.
Dim xrefObjId As ObjectId = xrefdb.AttachXref(strPartFile, Path.GetFileNameWithoutExtension(strPartFile))
Dim bref As New BlockReference(Point3d.Origin, xrefObjId)
Dim scale As Scale3d = blkRef.ScaleFactors
bref.Position = blkRef.Position
bref.Rotation = blkRef.Rotation
bref.ScaleFactors = scale
btrMs2.AppendEntity(bref)
blkRef is defined like this
Using trans As Transaction = database.TransactionManager.StartTransaction()
Dim btr As BlockTable = DirectCast(trans.GetObject(database.BlockTableId, OpenMode.ForRead), BlockTable)
Dim btrMs As BlockTableRecord = TryCast(btr(BlockTableRecord.ModelSpace).GetObject(OpenMode.ForRead), BlockTableRecord)
'go through each object in the block table record
For Each entID As ObjectId In btrMs
'create the objectIDCollection used to create the wblock
Dim oidc2 As New ObjectIdCollection()
'create variable used to determine is it is a block reference
Dim ent As Entity = trans.GetObject(entID, OpenMode.ForRead, False)
'if it is a block then perform code below
If TypeOf ent Is BlockReference Then
'since it is a block, add to the IDcollection
oidc2.Add(entID)
Dim blkRef As BlockReference = TryCast(trans.GetObject(entID, OpenMode.ForRead, False), BlockReference)