In Real-Time LCA we are doing lot of testing to make sure that data is being transferred and converted correctly in the different processes from Revit and all the way to RTLCA.
This requires me or the developers to have Revit installed, but I was curios to learn if it was possible to programmatically re-committing an object in through .NET?
This way our developer team could skip the Revit > Select > Send and instead commit directly to the server and take it from there?
This will list all the commits you’ve sent from Revit or whatever - I’ve included the date, message and sourceApplication for identification ease, but really you only need the referencedObject
with what you now have the rest is a doddle with the mutation:
I honestly didn’t know that you simply could re-commit an already applied referencedObject. Nice! That is gonna be very helpful for the dev team.
This made me think (yes, believe it or not )
Let’s say I want to have a script that creates a new stream, commits an existing referencedObject and invites people to that stream.
I just tried to reference another existing streamId but keeping the referencedObjectId, which obviously throughs an error since it’s not able to locate the referencedObject within that streamId.
How could I do this?
Storing the json object and sending that?
This would serve as a script we could run in an automatic flow for each new tenant we onboard, so they have the same Demo project but in different streams when they enter the platform ← which is done manually now
In this case, you must retrieve the data and then send a ‘fresh’ commit. All versions are specific to a project and not a server.
In the onboarding of FE2 this is almost how the Sample project is created, it is a bit more database, but you could (or get someone else to) take a look at how this magic is performed but you can easily do it as you described.
If it is always the same sample project, then definitely store the JSON data. This is where using the SDKs is important useful as all objects that have nested referenced objects will need to be fully resolved in your stored JSON. It will then need to be serialised, sent to the server and then a commit made of that serialised data payload.