Hello,
Specklers,
This might be a simple question. But, I would appreciate it If someone could help me with this.
How can I get the @Rooms in the Speckle stream when I expand data view
Hello,
Specklers,
This might be a simple question. But, I would appreciate it If someone could help me with this.
How can I get the @Rooms in the Speckle stream when I expand data view
Are you only interested in rooms?
Hello,
Jonathon,
I am interested @Walls, @Structural Columns, @StructuralFoundations, etc.
right so following from that tutorial, we should update it as it is subject to this:
The example fix code I shared in that post uses c#, but the python equivalent is trivial to use.
# This mimics the C# null-coalescing operator ?? and LINQ's FirstOrDefault
walls = my_commit.get("@walls") or next(
(e['elements'] for e in my_commit['elements']
if e['name'] == 'walls'), None)
print(walls)
If you have only recent commits from revit then you don’t need the conditional check.
walls = next(
(e['elements'] for e in my_commit['elements']
if e['name'] == 'walls'), None)