BlockTableRecord bDef = (BlockTableRecord)tr.GetObject(blkTable[cNomBlk], OpenMode.ForWrite, false);
ObjectIdCollection objColl = bDef.GetBlockReferenceIds(false, true);
foreach (ObjectId objId in objColl)
{
BlockReference br = (BlockReference)tr.GetObject(objId, OpenMode.ForWrite, true);
if (br.AttributeCollection.Count > 0)
{
foreach (ObjectId id in br.AttributeCollection)
{
AttributeReference att = (AttributeReference)tr.GetObject(id, OpenMode.ForWrite);
if (attValLst.Contains(att.Tag.ToUpper()))
{
att.TextString = attValueLst[att.Tag.ToUpper()].ToString();
}
}
br.RecordGraphicsModified(true);
}
}