Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello guys, i am trying to get the original solid of a SLOPPED column that has cuts and joins with other elements, try to use "GetOriginalGeometry" but it loses the slope, so it occurred to me to use a transaction to temporarily remove the nearby elements and get the solid of the column already isolated and then with "RollBack" restore the deleted elements, all good but the solid supposedly obtained does not exist. What am I doing wrong?, I did the same thing other times but only obtaining the volume as "double" and it worked, but it seems that with "Solid" it doesn't work.
What am I doing wrong? Do you recommend another way?
public static Solid Get_original_solid (Element elem, Document doc, Options opt)
{
List<ElementId> Ids_nearestElems = new List<ElementId>();
List<Element> nearestElems = Get_NearestElements(elem, doc);
foreach (Element e in nearestElems)
{
Ids_nearestElems.Add(e.Id);
}
Solid originalSolid = null;
using (Transaction trans = new Transaction(doc))
{
trans.Start("Get original solid");
doc.Delete(Ids_nearestElems);
doc.Regenerate();
Solid solid = GetSolid(elem, opt);
originalSolid = solid;
trans.RollBack();
}
return originalSolid;
}
Solved! Go to Solution.