Menu

Finding spaces relation to IfcBuildingStorey

Help
Kickdak
2019-08-27
2019-08-28
  • Kickdak

    Kickdak - 2019-08-27

    Hey,
    Im trying too get the BuildingStorey Value on each of my spaces.
    This is what im trying right now but its not correct.

    spaces = ifcfile.by_type("IfcSpace")
    for space in spaces:
        for rel_e in space.IsDefinedBy:
            if space.is_a('IfcRelContainedInSpatialStructure'):
                print("Floor Found")
    

    Any idea on what too change in the code?

     
  • Thomag

    Thomag - 2019-08-28

    Try:

    spaces=ifcfile.by_type('IfcSpace')
    for space in spaces:
            print('Room',space.Name,' is at floor:',space.Decomposes[0][4][2])
    
     
    👍
    1

    Last edit: Thomag 2019-08-28
  • Kickdak

    Kickdak - 2019-08-28

    Thnx! Works like a charm

     
  • Kickdak

    Kickdak - 2019-08-28

    Thnx! Works like a charm

     

Log in to post a comment.

MongoDB Logo MongoDB