revit-ifc icon indicating copy to clipboard operation
revit-ifc copied to clipboard

PR: Wrong phase used for export

Open thumDer opened this issue 1 year ago • 3 comments

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 avatar Feb 19 '24 12:02 thumDer

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

thumDer avatar Feb 19 '24 15:02 thumDer

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

AngelVelezSosa avatar Feb 20 '24 01:02 AngelVelezSosa

likely [REVIT-216707]

parrela avatar Feb 26 '24 14:02 parrela