I created a custom Mass family, which is a simple cylinder. I'm trying to place it on a specific point on a specific level using the NewFamilyInstance method.
This is the code I'm using to place the instance:
doc.Create.NewFamilyInstance(new XYZ(0, 0, 0), symbol,
ele.Document.GetElement(ele.LevelId),
Autodesk.Revit.DB.Structure.StructuralType.UnknownFraming);
The problem is that the instance is placed always at level 1, no matter what the input level. I noticed that the input level appears on the instance's Host constraints. Please refer to the image below:
Would highly appreciate it if anyone points out my mistake.
Cheers!