Quering and Updating the User Attributes from Rhino and Grasshopper using speckle

Hi @sujal_ks!

I have good news and bad news for you :slight_smile:

The good news is that our API does allow you to filter the results using a query. The bad news is that this is not exposed on our Grasshopper nodes (and would be tricky to do so).

@dimitrie wrote a very nice answer on this thread (GraphQL: how to query a speckle object - #4 by dimitrie) that will give you some insight on how the query and select features work.

On a brighter side, it is possible to do this in Grasshopper using a short custom python/c# script. We have docs on our website on how to set those up, and there’s a couple of nice nodes you could have a look at here

Commits in speckle are like snapshots of the data you’re sending, so currently you cannot update a specific commit to “amend it” as you could do with git. Your best solution would be to re-send the entirety of your data.

This doesn’t mean you are actually sending everything again, as any objects that are unchanged will have the same id when converted to speckle, and will be skipped if the object already exists in a prior commit of that stream. @cristi may be able to provide more details of that diffing behaviour, as this goes beyond my knowledge :slight_smile:

Hope this helps! Let us know if you need any more clarification :+1:t3:

3 Likes