Revit_Toolkit
Revit_Toolkit copied to clipboard
Add View Filters
Issues addressed by this PR
Closes #1501
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
@pawelbaran, you can find the commit with all your comments incorporated in the following commit 53b434e531e72f7dfff667e84bc84fe0fe625026
@BHoMBot check compliance
@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
@pawelbaran, thanks for your comments. Updated code now in latest commit 501e2c20649297356551cbccdc519b0760909d66
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
Worksetstill throw error on pull - 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 👍