http://blogs.autodesk.com/revit/2019/01/08/export-assembly-separate-pcf-file/?wpfpaction=add&postid=4287 public void ExportSelectoinToPCF () { // get the selected element ids List < ElementId > elementIdsToPCF = new List < ElementId >(); List < ElementId > selectedElementIds = this . ActiveUIDocument . Selection . GetElementIds (). ToList (); elementIdsToPCF . AddRange ( selectedElementIds ); // output PCF for each assembly OutputAssemblyPCFs ( elementIdsToPCF , this . ActiveUIDocument . Document ); } // ExportSelectoinToPCF public void OutputAssemblyPCFs ( List < ElementId > selectedElementIds , Document theDocument ) {