Autodesk / revit-ifc

IFC for Revit and Navisworks (2019+)
482 stars 194 forks source link

PR: Wrong phase used for export #745

Open thumDer opened 8 months ago

thumDer commented 8 months ago

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:

  1. Have 2 phases in the project (P1, P2)
  2. Create one wall on each of them
  3. Set the source views phase to P1
  4. Export an IFC, with the setting "Export only elements visible in view", save the setup
  5. Change the source views phase to P2
  6. Export another IFC, select the previously saved Export setup, but don't click "Modify setup"
  7. 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

thumDer commented 8 months ago

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

AngelVelezSosa commented 8 months ago

We've identified this issue and hope to have a fix in a future update.

parrela commented 8 months ago

likely [REVIT-216707]