Message 1 of 10
Create an instance of a family on work plane.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, I am struggling to place an instance of a profile family on a work plane. I am not sure if I am moving to write direction, so maybe someone could check my code or give a link to solution how to place family instance on a work plane.
ReferencePlane frbackPlane = null;
// get a reference plane FilteredElementCollector planescollector = new FilteredElementCollector(RvtDoc.revdoc); ICollection<Element> planesInProject = planescollector.OfClass(typeof(ReferencePlane)).ToElements(); foreach (ReferencePlane planeEl in planesInProject) { if (planeEl.Name == "Center (Front/Back)") { frbackPlane = planeEl; } } // place family instance
FamilySymbol famsym = RvtDoc.revdoc.GetElement(loadedfamel) as FamilySymbol; XYZ startLoc = new XYZ(0, 0, 0); XYZ endLoc = new XYZ(0, 0, 100); famsym.Activate(); famsym.get_Parameter(BuiltInParameter.FAMILY_WORK_PLANE_BASED).Set(0); FamilyInstance instance = RvtDoc.revdoc.FamilyCreate.NewFamilyInstance(frbackPlane.GetReference(), startLoc, endLoc, famsym);
