Message 1 of 4
Erase attribute inside block
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've erased attribute and correctlty erased.
but remained attribute inside block.(block edit)
Please See below code.
BlockReference blkRef = (BlockReference)acTrans.GetObject(blkId, OpenMode.ForWrite);
foreach (ObjectId attId in blkRef.AttributeCollection)
{
AttributeReference attRef = (AttributeReference)acTrans.GetObject(attId, OpenMode.ForWrite);
string tag = attRef.Tag.ToUpper();
string tagValue = attRef.TextString;
if (attRef.Tag.StartsWith("test"))
{
attRef.Erase();
}
}