Conversation
…com/BHoM/Revit_Toolkit into Revit_Toolkit-#1444-FilterPrototype
- Enum LinePattern - Enum SolidPattern - Class OverrideGraphicSettings - Class FilterRule
- Enumeration Class that works as an attribute of the FilterRule Class, allowing to avoid the use of several abstract and concrete classes for each type of rule type.
…com/BHoM/Revit_Toolkit into Revit_Toolkit-#1444-FilterPrototype
To simplify the mirroring representation of the Revit API classes within the BHoM, it's necessary to add a concrete classe, subclass of FilterRule, that corresponds to the FilterValueRule from Revit API. Whatever sub-class type as well as Evaluator class type will be represented in BHoM via enumeration classes assigned to the RevitFilterRule and RevitFilterValueRule as attributes.
Instead of using a single class FilterRule with an Enumeration encapsulated to represent all the different Revit API Filter Rules, we go for creating multiple classes and sub-classes in BHoM as well, thus trying to match as much as possible the classes structure that is present in the API.
Add NOT_START_WITH and NOT_ENDS_WITH enum values to the enumeration. These are required to implement the View Filtering in BHoM.
Useful to create LevelFilterRule objects
…Convert.ToRevit Namespace
Greater, GreaterOrEqual, Less, LessOrEqual are added to reflect the types and names of the subclasses of the Revit API class FilterStringRuleEvaluator
…ype Enum Values Greater, GreaterOrEqual, Less, LessOrEqual
Instead of keeping the conversion of FilterRule objects from/to Revit/BHoM within the ParameterFilter/ViewFilter conversion classes only, we split the code in each different FilterRule Class keeping the code more modular and reusable.
The View3D Class is a subclass of the View Class. To let the BHoM run the Update method on the View3D class, we need to specify an overloaded version of the Update Method taking a View3D class instance rather than a View class instance as input.
…neric Type Since View3D is a subclass of View in the Revit API, we can make the Update method work on a generic type T, specifying that it must be extending the revit api superclass View.
Using this abstract class it's possible to decouple the ParameterValuePresence Class from the FilterValueRule class.
…num values and Revit Category Objects
|
@pawelbaran, you can find the commit with all your comments incorporated in the following commit |
|
@BHoMBot check compliance |
|
@pawelbaran to confirm, the following actions are now queued:
|
…al Casing Co-authored-by: Pawel Baran <pawel.baran@burohappold.com>
…rrors in PatternId assigment
|
@pawelbaran, thanks for your comments. |
|
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:
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 👍 |
|
Please be advised that the check with reference 64932706136 has more than 50 annotations of notes. API limitations restrict annotations to 50. You may need to rerun this check to obtain the next set when you make changes. At the time of reporting this check, there are 66 additional annotations waiting, made up of 66 errors and 0 warnings. |

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