Revit Object Id


I am using the speckle plugin for exporting the Revit file, which contains more than 100 elements. After uploading file in speckle server, even if I modified single elements in Revit file It is observed that there is changes in objectId of other elements as well. I am expecting to change the object id changes for only modified elements and there is same time stamp for updated and created one. If I split the element in two hoe can I get the relation of newly created element with respect to parent ?


Hey @Ritesh_Solanke, welcome to the forum!

First of all, are you using speckle v1 or the v2 alpha?
Which id property are you referring to? There’s a few in use (depending also on the version of speckle) eg: id, applicationId, elementId…


Hey @teocomi,

I am talking @ the objectId which created by speckle is not persistent, whenever there is change in one element it changes for un-modified element as well. Even in case of modified element you are generating the new objectId then how can we relate it to the original elements that modified.


Revit has some funky problems with floating point precision - the funny thing is that when you export a wall’s mesh you always get minor fluctuations in the insignificant digits realm. Unfortunately, speckle 1.0’s hashing algorithm gets triggered by these fluctuations and give you a new hash.

We’re going to round these numbers up a bit in 2.0 - it’s something actually @teocomi and me are just getting to today :sun_with_face:

Hey @dimitrie

Great !

In case of modified element Speckle is generating the new objectId, how can we relate it to the original elements that modified as there is no history track, this I observed with Revit but in Revit we have elementId and but difficult to manage in Rhino as there is no unique ID.

In revit, yes, the applicationId (afaik it’s the UniqueId not the Id, as the latter is not unique across projects/linked projects in the same file can cause conflicts) stays the same.

This allows you to trawl a stream and it’s children for objects with the same applicationId, and do an object per object diff.

From Rhino, you’re right - 1.0 doesn’t take the applicationId with it (Rhino does have application ids too!), but 2.0 will. I’ve actually raised an issue on this now. Grasshopper though - tough luck there - there are no application ids to be had.

@Ritesh_Solanke, FYI we just closed the rhino issue re application id in 2.0: Dim/rhino polish 🦏✨ by didimitrie · Pull Request #130 · specklesystems/speckle-sharp · GitHub So if you’re having fun with 2.0, fetching the latest would help!

Thanks @dimitrie I will check and come back to you. I have just curious to know, how did you manage to get the application Id if Rhino is not providing !

Rhino is providing, grasshopper doesn’t! For gh, this gave us some headaches in 1.0, but we’ve sorted them in 2.0 (smartly generating some for schema builder elements). I think less interesting for your usecase, but still :slight_smile:

Can it be possible to get the history of element modified, e.g. consider case of originally one element and split into two elements. If we are generating the two new id’s, how can get back the traceability of parent element which is having different id.

I think that’s not possible in rhino - remember looking at one point into this a bit more, and gave up. If you remember, it’s when it displays as well “history will be broken by this action” warnings whenever you split the base curve from a lofted surface if you turn on the “history mode” (not sure it’s called that).

In something like solidworks, that’s a different situation - i expect there it’s possible, as it’s a “canonical” parametric modeller which keeps track of all relationships, but we have yet to plan for a solidworks integration :smiley:

hey @dimitrie, is their REST API to get Revit Id for each object. If not is their plan to add it in @2.0.

Hey @Ritesh_Solanke,

Yes, with the new API and schema, you’ll be getting for each object genereted in Revit both their ElementId and UniqueId fields.

Hope it helps!

1 Like

I have suppose 100 objects in stream and next iteration if I modified 20 objects, then speckle generate new objectid for all 20 elements. If I am speckle API user, I need to compare each list of object id’s with the updated version. Is there any better solution that you can suggest.

One point oh had a diff endpoint, which was even more enhanced later on by @pauldotnet - we’re planning to bring that back. Until then, I’m afraid not!

hey @dimitrie when we will get the speckle 2.0

Hi Ritesh, we should be releasing a beta version soon! You can already access all the source code on github in the meantime.

can you give tentative date, so we can plan accordingly.

Hi @Ritesh_Solanke it should be in Q1, if you’re planning to build something on top of Speckle I’d recommend starting now as our codebase won’t have major breaking changes in the upcoming months, mostly bug fixes and new docs :slight_smile:

1 Like