Exporting with PhaseFilter "New Only" exports nothing

Exporting with PhaseFilter "New Only" exports nothing

Anonymous
Not applicable
458 Views
1 Reply
Message 1 of 2

Exporting with PhaseFilter "New Only" exports nothing

Anonymous
Not applicable

Exporting using a PhaseFilter with only ElementOnPhaseStatus.New set to visible results in no models or materials being exported. If ElementOnPhaseStatus.Existing is set to visible, everything is exported correctly but there are duplicate elements.

A View3D with the filter applied, is created for each phase, and the project is run through an IModelExportContext using the created views. I'm currently testing on the Sample House scene in Revit 2019.

Attached is a screenshot of the resulting export when ElementOnPhaseStatus.Existing is set to visible.

 

 

// create phase filter
PhaseFilter phaseFilter = PhaseFilter.Create(doc, "Export New Only"); phaseFilter.SetPhaseStatusPresentation(ElementOnPhaseStatus.Existing, PhaseStatusPresentation.DontShow); phaseFilter.SetPhaseStatusPresentation(ElementOnPhaseStatus.Demolished, PhaseStatusPresentation.DontShow); phaseFilter.SetPhaseStatusPresentation(ElementOnPhaseStatus.New, PhaseStatusPresentation.ShowByCategory); phaseFilter.SetPhaseStatusPresentation(ElementOnPhaseStatus.Temporary, PhaseStatusPresentation.DontShow);

 

 

// each view has phase filter applied
view.get_Parameter(BuiltInParameter.VIEW_PHASE_FILTER).Set(phaseFilter.Id);
// export using the created views
CustomExporter exporter = new CustomExporter(doc, new ModelExporter(doc))
{
#if REVIT_2015
	IncludeFaces = true,
#else
	IncludeGeometricObjects = true,
#endif // REVIT_2015
	ShouldStopOnError = true
};

exporter.Export(viewIds);

exporter.Dispose();

 

 

 

0 Likes
459 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

After testing with a different scene that contained many phases. It seems that all PhaseStatusPresentations need to be set to ShowByCategory, otherwise most elements are missing. My guess is that it is combining all the views and only exporting what is new in the last phase, as opposed to what is new in each phase.