Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hey,
i'm trying to place a family using the API (c#).
When using the NewFamiltInstace overloaded method that takes (location, symbol,host, level, structural) - i'm expecting to get the instance of the hanger family in the level i have inserted, and in the elevation of the host ( the duct).
instead - i get the duct hanger in the ground floor no matter what i'm doing, can any one understand why, and what sholud i do to get it in the desired level?
the code from my transaction:
using (Transaction trans = new Transaction(doc, "Place Family"))
{
trans.Start();
int indx = 0;
foreach (XYZ hanger_xyz in hangerCoordinates)
{
if (!hangerSymbol.IsActive)
{
hangerSymbol.Activate();
}
doc.Create.NewFamilyInstance(hanger_xyz, hangerSymbol,duct,level, Autodesk.Revit.DB.Structure.StructuralType.NonStructural);
}
trans.Commit();
}
Solved! Go to Solution.
Developer Advocacy and Support,