i am trying to insert a block with 4 attribute to paperspace and i got the block inserted ok, but then you can't see it unless you do a quickselect and it's there, but you only see the insertion grip but not the attribute grips. try to insert the created block with autocad command works ok. so which means block created properly.
'insert revision block
Dim br As New BlockReference(New Point3d(dX_RevisionInsert, y2 - dRev_V_Offset * dBorderScale, 0), Create_Revision_Note_Block(db))
BTR_Layout.AppendEntity(br)
'Dim revBtr As BlockTableRecord = trans.GetObject(br.BlockTableRecord, OpenMode.ForRead)
Dim revBtr As BlockTableRecord = trans.GetObject(bt(Rev_Block_Name), OpenMode.ForRead)
For Each id As ObjectId In revBtr
Dim oAttDef As AttributeDefinition
Dim oAttRef As AttributeReference = New AttributeReference()
Dim ent As Entity = trans.GetObject(id, OpenMode.ForRead, False)
If TypeOf ent Is AttributeDefinition Then
oAttDef = CType(ent, AttributeDefinition)
oAttRef.Height = oAttDef.Height
oAttRef.Rotation = oAttDef.Rotation
oAttRef.Tag = oAttDef.Tag
Select Case oAttDef.Tag
Case Rev_No_Tag
oAttRef.TextString = CStr(iRevision)
Case Rev_Date_Tag
oAttRef.TextString = sRevDate
Case Rev_Desc_Tag
oAttRef.TextString = sRevDesc
Case Rev_Sig_Tag
oAttRef.TextString = sRevSig
End Select
End If
br.AttributeCollection.AppendAttribute(oAttRef)
trans.AddNewlyCreatedDBObject(oAttRef, True)
Next
br.SetDatabaseDefaults()
trans.AddNewlyCreatedDBObject(br, True)
Stantec
Dell Precision 5530, Prism M320PU, C3D 14/17/19