Online Viewer Filtering based on Grasshopper Object Properties


How can I create a new filter?

I have 18 meshes, representing structural slabs.
Each slab has a parameter called Snowload. I would like to use that parameter as a filter, so I can colour the slabs with different snow loads differently. Is that possible, and if, how?

Thanks for the help!

1 Like

Hi @Laurin! You should be able to, and theoretically snowload should show up in there. Can you send us the gh defintion?

I just hacked a quick example below:

and the result:

Note that i’m attaching the snowload property directly to the object, using the Extend Speckle Object component!

Hey @Laurin ,

In order for filtering to work in your case, mesh and the parameters you want to color by should be in the same level.

Should be like this👇:

Instead of this👇:

So instead of creating a speckle object from your mesh and extending it with key/values, use your Mesh geometry as the “Speckle object” input. This way your geometry and attributes will be in the same level.

1 Like

Thank you both @dimitrie and @gokermu,

now the question is how do I create the filter? :smiley:

1 Like

Click on “Filter Groups” and select the parameter you want to color by. Take a look at the following commit:

I don’t know what I am doing wrong but now, the snowload key of every mesh gets the same value, even though my input list contains 2.5 and 0.8.

1 Like

I think something is wrong with your list order. Can you share the GH definition?

Sure! (13.5 KB)

1 Like

Oh ok. Extend Speckle Object by Key/Value does have some known issues. It’s only really recommended if you want to create multiple speckle objects with different keys. TO create multiple objects with the same keys it’s much more reliable to do so with the Extend Speckle Object. Take a look👇:

PS. I forgot to paste the screenshot🤦‍♂️ (12.6 KB)

1 Like


that worked :heavy_check_mark: