Recommit only modified objects

Hello, Speckle Team.

I intend to develop an application using the C# SDK where my objective is to retrieve the latest commit, make specific modifications to certain objects within the commit, and then create a new commit exclusively for the modified objects. The current code functions properly, but my goal is to avoid recommitting all the objects and only commit the ones that have been modified.

I came across a discussion on this topic, but I’m having difficulty understanding how to implement the solution.

If I understand correctly there might be a way to exclusively save the modified objects and recommit only those specific changes.

Thank you in advance!

How extensive would this application be? Could we think of this as a candidate for Speckle Automate?

In my scenario, I’ve implemented a button in the frontend. Upon pressing this button, the application will proceed to modify the hardcoded attributes of the selected objects and generate a new commit. I don’t think, that this qualifies as a candidate for Speckle Automate.

I only ask as the basic architecture of Automate is that every Send from host application can trigger an automation. The C# SDK can achieve what you want without building a UI if it isn’t needed. If you instead want to manually select the objects to modify then this will need a UI.


To your question. If the original Version Commit payload only has a subset of Properties of a select set of Elements to be changed, then the changes could be made on that payload in-situ.

So, keep the relational tree intact rather than flatten the objects retrieved with C# SDK.

When Sending the result as a new Version Commit, the serializer will do the heavy lifting, replace new hashed objects in place, and leave anything unchanged intact.

Connectors should then make sense of this hierarchy and automatically identify what is new/unchanged as if the commit had been made from the host application itself.

We cover the theory of this in Speckle Guide: Traversing Structured Data | Speckle Docs

@jedd and I sort of covered this in two SpeckleCon sessions but will be writing up as a tutorial in due course:

I appreciate the quick response. I’ll delve into the topic, and based on your answer, I’m confident I’ll manage. Thank you.

Keep us updated, your mention of buttons in frontend has us intrigued :wink:

1 Like