Independent tag Bounding Box getting null for the second time.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
UIApplication uiApp = commandData.Application;
Document doc = uiApp.ActiveUIDocument.Document;
UIDocument uidoc = commandData.Application.ActiveUIDocument;
IndependentTag tag = doc.GetElement(ckt) as IndependentTag;
BoundingBoxXYZ tagBox = tag.get_BoundingBox(uidoc.Document.ActiveView);
//tagBox not null
IndependentTag tag2 = doc.GetElement(ckt) as IndependentTag;
// Same tag (ckt)
using (Transaction trans = new Transaction(doc, "Tag D"))
{
trans.Start("Start");
tag.HasLeader = false;
trans.Commit();
}
BoundingBoxXYZ tagBox2 = tag2.get_BoundingBox(uidoc.Document.ActiveView);
//tagBox null
//With using below code every time getting Bounding Box, but it is generating graphics for every tag and taking long //time.
View sec = doc.GetElement(tag.OwnerViewId) as View;
BoundingBoxXYZ tagBox = tag.get_BoundingBox(sec);
//Is there any other method to get bounding box without generating graphics.