Hello all,
I have modeled different storeys of a structure in different revit files, but after finishing all of them, I have to combine them all in another software; however, I found out that some elements of one revit file have same element IDs as that of other revit file. Therefore, I would highly appreciate if anyone can suggest a way to solve this issue.
I checked but it seems that I can not change element IDs. I am looking forward to your ideas, suggestions and recommendations. Thanks!
Best regards,
Gelöst! Gehe zur Lösung
Gelöst von ToanDN. Gehe zur Lösung
Gelöst von L.Maas. Gehe zur Lösung
Gelöst von loboarch. Gehe zur Lösung
Gelöst von RobDraw. Gehe zur Lösung
Actually, I need the whole structure's model to be simulated in another software. The simulation software recognizes each element through its element ID, but since I have created models of different storeys of the structure in different revit files, there are duplicate element IDs, which create issue in giving me a complete structure in my simulation software. If I can change those duplicate element IDs in one of the revit files and remove the duplication, this issue would be solved. Other solutions are also welcomed.
Actually, that simulation software has just been developed and is being tested before its launch in the market. This software has to simulate a construction process. The most important point is that this software identifies each element through its element ID and duplication of element IDs is a serious issue atm.
@Anonymous wrote:
Actually, that simulation software has just been developed and is being tested before its launch in the market. This software has to simulate a construction process. The most important point is that this software identifies each element through its element ID and duplication of element IDs is a serious issue atm.
Then now is the perfect time to fix the software so that it can deal with duplicate Element IDs when it launches.
That is technically not possible for various reasons. Issues arising from duplicate elements can be solved, but issues arising from duplicate element IDs are quite complex because the duplication of IDs can be between completely different elements in numbers as large as thousands.
ElementId id = e.GetTypeId();
ElementType type = doc.GetElement( id )
as ElementType;
How'd I do?
@Anonymous wrote:
That is technically not possible for various reasons. Issues arising from duplicate elements can be solved, but issues arising from duplicate element IDs are quite complex because the duplication of IDs can be between completely different elements in numbers as large as thousands.
If it is impossible to fix it for a software under development then how do you think the end-users with limited or no access to the source codes of Revit be able to fix it?
If I understood your point, you are suggesting to incorporate element type as well for accurate recognition, but the issue is that element ID is more unique than element type. So, there are many duplicate elements with the same element types; hence, I think that this would not work out in this case.
You are right, but somehow, there is technically not much that we can do in this case considering the limitations of revit itself. This software has to identify every element in the model and the number of elements can be as high as hundreds of thousands. So, the element IDs are the only identifiers that we can use to achieve this identification purpose. This duplication does not usually occur if we model the whole structure in 1 revit file, but that is also not possible because of the huge size of structure. Therefore, we need a way out of this issue.
Thanks for your input.
Can we append other IDs to element IDs in revit? Or is there any way we can get rid of this duplication before importing the revit models into our simulation software?
Why not combine the models? That should make every ID unique.
I'm with the others. Since element IDs are an arbitrary number, the software needs a better way to handle them when multiple models are used. Until then your software is going to be limited to just one model.
Cut and then paste aligned to the same position. This will change the Element ID of the object, because you are basically making a "new" element.
You might consider using UniqueID/GUID which is exposed through the API
The Revit ID is more or less just a counter. Every new item gets a number based on the last number + 1
As you noticed the numbers between documents can be the same.
UniqueID should work better between documents, but not foolproof. For example if you would copy your project to a new file the elements in the model retain their IDs (as expected). When reading information from both files you will still see the same numbers. But models that have been created separately should be OK.
A good source for you might be the building coder which deals with the Revit API. For example THIS post on IDs
Also the Revit API forum might be a good source to ask questions and find answers.
Louis
Please mention Revit version, especially when uploading Revit files.
@Anonymous wrote:
Can we append other IDs to element IDs in revit? Or is there any way we can get rid of this duplication before importing the revit models into our simulation software?
I think it would be better for you to take care of it in the software, not in the source files, so that the software can work with various formats from different programs. Something like generating random numbers and assign them to imported elements. Not sure what programming language you are using but Python and Java can do it and I have no doubt others can as well.
Thank you ToanDN for your creative input. We do need to make changes in the software.
Thank you L.Maas for your input. UniqueIDs are indeed better than element IDs.
Yes, you are right. The software needs to be changed to resolve this issue.
Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.