Revit_Toolkit icon indicating copy to clipboard operation
Revit_Toolkit copied to clipboard

Add View Filters

Open GCRA101 opened this issue 1 year ago • 5 comments

Issues addressed by this PR

Closes #1501

Test GH Script - All Algorithms

Test Revit Model - 3D View Filters Table

It is now possible to push, pull and update View Filters in Revit via the BHoM and assign to them OverrideGraphicSettings in selected Views.

Test files

Grasshopper File

[https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Revit_Toolkit/%231502-AddViewFilters/TestScript.gh?csf=1&web=1&e=l3Fafx](url)

Revit Files

[https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Revit_Toolkit/%231502-AddViewFilters/TestRevitfile_PushModel.rvt?csf=1&web=1&e=O8L8fo](url) [https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Revit_Toolkit/%231502-AddViewFilters/TestRevitfile_PullModel.rvt?csf=1&web=1&e=ge2KZI](url) [https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Revit_Toolkit/%231502-AddViewFilters/TestRevitfile_UpdateModel.rvt?csf=1&web=1&e=yj4ExY](url)

Changelog

  • FilterRules classes mirroring the corresponding Revit API ones (all within a new namespace FilterRules)
  • New Elements classes View, ViewFilter and OverrideGraphicSettings
  • Conversion methods in the Convert partial class allowing to convert BHoM ViewFilter objects into/from Revit ParameterFilterElement

GCRA101 avatar Sep 02 '24 17:09 GCRA101

@pawelbaran, you can find the commit with all your comments incorporated in the following commit 53b434e531e72f7dfff667e84bc84fe0fe625026

GCRA101 avatar Oct 16 '24 11:10 GCRA101

@BHoMBot check compliance

pawelbaran avatar Oct 16 '24 13:10 pawelbaran

@pawelbaran to confirm, the following actions are now queued:

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

bhombot-ci[bot] avatar Oct 16 '24 13:10 bhombot-ci[bot]

@pawelbaran, thanks for your comments. Updated code now in latest commit 501e2c20649297356551cbccdc519b0760909d66

GCRA101 avatar Oct 16 '24 15:10 GCRA101

Thanks for the activity @GCRA101 - can see your commits addressing my comments on the ongoing basis 😃 I think the code is OK now, I am slowly switching to testing. Found quite a few bugs so far:

  • filters with Workset still throw error on pull image
  • same as above for has value and does not have value
  • updating categories using Push/Update causes reset in the filter (which kind of makes sense - after modifying categories one would need to check if all parameters are available in each of them, so not surprised it breaks things, it almost feels like updating categories should not be allowed)
  • changing any parameter in the filter resets all parameters in the filter

All above cases are covered in the test materials I updated here. Please note these materials cover only the most basic cases, you'll need to test the code against real life models too. But this is the last step, let's focus on getting the basics sorted first 👍

pawelbaran avatar Oct 16 '24 15:10 pawelbaran