revit-ifc
revit-ifc copied to clipboard
PR: Wrong phase used for export
Problem Description
It seems like the cached export phase does not get updated when the phase of the active view used for export is changed. Steps to reproduce:
- Have 2 phases in the project (P1, P2)
- Create one wall on each of them
- Set the source views phase to P1
- Export an IFC, with the setting "Export only elements visible in view", save the setup
- Change the source views phase to P2
- Export another IFC, select the previously saved Export setup, but don't click "Modify setup"
- The second exported IFC will have the same content as the first, the pase didn't get updated as per the source view
I'm using the most recent version of Revit 2024 and the related exporter.
https://github.com/Autodesk/revit-ifc/assets/54556708/e7d968e7-8ca3-4d23-a25e-6d80c4c0c207
Workaround
If I click Modify setup, and close the setup window with OK, the phase gets updated, and the export is correct, The workaround is a risk, easy to forget.
This seems to be a low hanging fruit to fix, so please treat it accordingly.
Revit Version
2024.2.0
IFC for Revit Addon Version
24.2.0.49
Windows Version
11 23H2
I did some digging, and I suspect that changing the condition in ExportOptionsCache
at
https://github.com/Autodesk/revit-ifc/blob/6498fbdae7f3889708ebded66d90ca829d165f82/Source/Revit.IFC.Export/Utility/ExportOptionsCache.cs#L411
to
if (cache.FilterViewForExport != null)
might solve this
We've identified this issue and hope to have a fix in a future update.
likely [REVIT-216707]