Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to place a Fabrication part using one of the two methods. PromptForFamilyInstancePlacement() and PostRequestForelementTypePlacement().
I assume the FamilyInstancePlacement won't work because it requires a Family Symbol, which I believe Fabrication Parts do not have. Please correct me if I'm wrong. So, using the following code, Revit just passes over the placement line.
FilteredElementCollector fec = new FilteredElementCollector(doc)
.OfClass(typeof(FabricationPartType))
.OfCategory(BuiltInCategory.OST_FabricationPipework);
foreach (FabricationPartType fpt in fec)
{
if (fpt.FamilyName == "Part I'm looking to place")
{
uiDoc.PostRequestForElementTypePlacement(fpt); //This line gets hit, but does nothing.
break;
}
}I've also tried this using the ElementType, same result.
Any help is appreciated. Thanks!
Solved! Go to Solution.