Message 1 of 2
Insert block with attribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello everyone,
I wanted to insert a block which is exsiting on the drawing to a new point and updating attribitue defenetion.
BlockReference bref = new BlockReference(ptm, acBlkTbl["TestBlock"]);
foreach (ObjectId attId in bref.AttributeCollection)
{
AttributeReference ar =
acTrans.GetObject(attId, OpenMode.ForRead) as AttributeReference;
if (ar != null && ar.Tag.ToUpper() == "WTYPE")
{
ar.UpgradeOpen();
ar.TextString = "SR23";
ar.DowngradeOpen();
}
}
acBlkTblRec.AppendEntity(bref);
acTrans.AddNewlyCreatedDBObject(bref, true);
acTrans.Commit();I didn't get any warning during the build, but does not appear any block at the point place.