You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Query]: would you add extra detail to filteredElementCollectorByParameter.py for additional rules and evaluators or see those as separate ? #3
# We then set up an empty instance of a Filter Numeric Equals to test against a set value (In this case - whether or not the Element has the box ticked for 'Enable Analytical Model'
evaluator=FilterNumericEquals()
# After we have the empty instance set up as our evaluator, we run a Filter Integer Rule that checks the chosen parameter (Enable Anyalytical Model), runs against the evaluator (Does this Number equal) and our value (1 which correlates to the tick inside of our yes/no tickbox)
rule=FilterIntegerRule( provider, evaluator, 1 )
an evaluator for greater than evaluator = FilterNumericGreater()
which you could also use not for less than
an evaluator for string contains evaluator = FilterStringContains()
an evaluator for strings equals evaluator = FilterStringEquals()
a rule for strings rule = FilterStringRule(provider, evaluator, test, False)
a rule for doubles rule = FilterDoubleRule(provider, evaluator, test, 10**-3)
a rule for element ids rule = FilterElementIdRule(provider, evaluator, test)
might also be helpful to refer to revitapidocs.com when trying to figure out what the param is
# Here we use the Built In Parameter method to choose the parameter (yes/no tickbox) of 'Enable Analytical Model' across all Elements inside of the Revit Document
changed the title [-][Query]: would you add extra detail to filteredElementCollectorByParameter.py for additional rules and evaluators or see those as seperate[/-][+][Query]: would you add extra detail to filteredElementCollectorByParameter.py for additional rules and evaluators or see those as separate ?[/+]on Jul 18, 2018
This particular example is supposed to be able to be 'ran' simply through a copy and paste into a Python node. I'm torn as to the format for your suggestion and welcome any thoughts.
I wondered if you might add some more #comments which show a few options, or alternatively you could create lots of different *.py files for different combinations of filters, rules, evaluators
for my own purposes I didn't like having lots of separate files as there could be a lot of combinations of filters, rules, evaluators, so I wrote an example that did all sorts of things but with lots of commenting out
I think it useful to have my example as a 'run and done' - then another uploaded as 'mix and match' version! Feel free to create a Pull Request for such!
Activity
[-][Query]: would you add extra detail to filteredElementCollectorByParameter.py for additional rules and evaluators or see those as seperate[/-][+][Query]: would you add extra detail to filteredElementCollectorByParameter.py for additional rules and evaluators or see those as separate ?[/+]Amoursol commentedon Jul 18, 2018
This particular example is supposed to be able to be 'ran' simply through a copy and paste into a Python node. I'm torn as to the format for your suggestion and welcome any thoughts.
adambear82 commentedon Jul 18, 2018
I wondered if you might add some more
#commentswhich show a few options, or alternatively you could create lots of different *.py files for different combinations of filters, rules, evaluatorsfor my own purposes I didn't like having lots of separate files as there could be a lot of combinations of filters, rules, evaluators, so I wrote an example that did all sorts of things but with lots of commenting out
Amoursol commentedon Jul 20, 2018
I think it useful to have my example as a 'run and done' - then another uploaded as 'mix and match' version! Feel free to create a Pull Request for such!
Merge pull request #3 from adambear82/adambear82-fecDouble
Merge pull request #3 from brencass/patch-1
Merge pull request #3 from Amoursol/master