Creating Filters

Hi All,

I wondered if anyone knew if it is possible yet, within rhino inside, to create new view filters/apply filters to templates etc.

I had previously written a script in dynamo to do this- but would obviously love to move solely into rhino inside given the chance.


Not seeing anything in the guide.

I do set the parameters for the filters in the directshapes example. You are referring to actually creating a new filter from Grasshopper?

Hi @scottd,

Yes ideally I would love to be able
To batch create view filters within grasshopper and apply them across multiple views/templates
And appy actions to them- such as turn on/off or everything that matches a specific filter make this a colour etc.

So not so much writing parameter values but creating filters from scratch (or
Even applying pre existing ones) to a set of drawings. Then even further perhaps batch making filled regions.

I know this is more delving into the documentation side of things- as opposed to working with rhino geometry etc.

Thankyou for your time
And Thankyou for all your work on this project!


1 Like

Added to the list

Create (10.8 KB)

Hi, I’m working out some code in order to have basic functionality regarding filter creation.
For now, I’ve been able to create selection filters (as always, most of the trouble arises when you try to update inputs since I’m not able to replicate element binding, I don’t know how to handle different kinds of exceptions etc). Take it with a gran of salt.

You can also apply those filters to a view, although I haven’t delved into setting graphics settings for these active filters.

I will also try to do something regarding parameter-based filters, but I don’t know when I will be able to get back to it.

1 Like

Create (17.0 KB)

Hi again,
I played around with parameter-based filters as well. Was able to get this one working thanks to an amazing example of code given by Ben Osborne on the Dynamo forum:

How to set a series Filter Rules using “OR (Any rule may be ture)” instead of “AND (All rules must be true)”?

I also realized we’re missing rule components such as “begins with”, “Contains” etc. which are very useful in these cases, I can try to report it on Github.

Next thing to do is to be able to deactivate these filters in views (currently only possible to activate), then graphics modifications for these filters which is why you want to have them in the first place right?

Create (23.8 KB)

Got it to work… somehow. I haven’t tested anything other than the scenario I set up specifically for this, so please don’t try to use this in any kind of production environment.

I need to learn a lot more about tree managing, how OOTB GH components work etc, in order to set up inputs correctly and take advantage of trees. For now, please use one branch per item, and don’t use uneven trees. That is, if you want to apply more than one filter for the same view, duplicate the tree as shown in the example.

Will try to make it work better over time, but for now I will need some time to study datatrees in GHPython.

This is looking great! Could you maybe show it in a short little video-
Also let me know what questions you have without data trees and happy to help!

Hi. First I want to ensure that my scripts work decently and for that I need to do quite a bit of cleanup and rethink all the stuff regarding datatrees, so no video for now. I’m also back from vacation, so I won’t be able to work on this stuff as much as I’d like to… anyway I will upload a cleaner version with instructions when it’s ready. Until then, try messing around with the definition using easy examples like 1 view, 1 filter, 1 override settings etc.

Very good I will have a look- and as I said- any issues or questions with data trees feel free to reach out!


Data Trees can be a real challenge in GHPython. There is a helper library that is important to use:

And there is some good expertise on the thread that may help:

1 Like