SBIM uid

Hi all!
I’ve been working with the json files that can be exported from SBIM inside Revit.

For the axes and placements an uid is generated in the json file. The goal of this is being able to generate from my side a json file with the parameters in the axes and placement from an external database, as a json file is a editable plain text.

Has anybody information in how the uids are generated from SBIM so that I can generate by myself?

Thank all

Hi,
The UID is simply an unique text identifier separated by hyphens, i.g. “12345678-1234-5678-1234-567812345678”.
How would you like to write the Json File. Using Python maybe ? check the uuid library

import uuid
print(uuid.uuid1())

Thank you for your quick reply.

I already tried but for sure I’m missing something.

For an example generated in SBIM find below the header of the file:

“Axes”: {
“$type”: “System.Collections.Generic.List`1[[SOFiSTiK.Revit.Infra.CommandInterface.AxisDefinition, sof_rvt_six]], mscorlib”,
“$values”: [
{
“Axis”: {
“$type”: “sofistik.sbim.model.infrastructure.Axis, sofistik.sbim.model.infrastructure_bond_mgd_six”,
“id”: 538976321,
“uid”: “2249016c-90e2-46c3-aea7-6c7080b7be2a”,
“geometry”: {
“geometry_type”: 2, …

When the uid “2249016c-90e2-46c3-aea7-6c7080b7be2a” is checked it seems to be a valid ramdom 4 generated uid.

If I use in python the : “uuid.uuid4()” to generate a random4 uuid I get for instance the following uid:“9b15530e-38a5-45d8-8f13-5b790903bd53” which I later use in the json file.

Then I try to import in SBIM and the following error appears:

“SiX - Execution could not be completed: La secuencia no contiene elementos”

Any idea?

Ok, finally solved.

UUID is present in different sections of the json file, and depends if you import the axis or the json file from the whole bridge.

No problem in generating uuid with the python package or even in excel.