has anyone some routine to get attribute refs from multileader?
I'm trying and have found some way to do it, but not sure if this is safe
Dim t As MLeader = trans.GetObject(oid, OpenMode.ForRead)
If t.HasContent Then
Select Case t.ContentType
Case ContentType.MTextContent
'strange, has mtext, but mtext is not in db
'Dim mt As MText = trans.GetObject(t.MText.ObjectId, OpenMode.ForRead)
If t.MText.Text.Length > 2 Then (..do your things...)
Case ContentType.BlockContent
'blocktablerecord?
Dim btrb As BlockTableRecord = trans.GetObject(t.BlockContentId, OpenMode.ForRead)
For Each oho As ObjectId In btrb
Dim oclass = oho.ObjectClass.DxfName
If oclass = "ATTDEF" Then
Dim attd As AttributeDefinition = trans.GetObject(oho, OpenMode.ForRead)
Dim attr As AttributeReference = t.GetBlockAttribute(oho) '(and do your things with attr)
End If
Next
End Select
End If
so, i'm not sure if GetBlockAttribute is the right way to access it, since i'm paranoid about not seeing any transaction
also, is there a different way?