Message 1 of 6
How to create temporary element?
Not applicable
01-26-2020
11:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to get the bounding box of a familyinstance that is created inside a transcation and use it to adjust its parameter in a single transaction. Here is the code.
using (Transaction t = new Transaction(doc, "Create Multiple"))
{
t.Start();
foreach (View view in views)
{
FamilyInstance fi = doc.Create.NewFamilyInstance(point, symbol, view);
BoundingBoxXYZ b = fi.get_BoundingBox(doc.ActiveView);
fi.LookupParameter(param).Set(b.Max.X.ToString());
}
t.Commit();
}