Menu

Create IfcBuildingStorey

2021-12-08
2021-12-08
  • jasper van der vaart

    Hey there again,

    I am trying to create a new IfcBuildingStorey, I based my approach on a wall creation I found in one of the example files (in IfcOpenHouse.cpp) . However I do not seem to be able to succeed in creating it.

    The example I tried to follow:

        IfcSchema::IfcWallStandardCase* south_wall = new IfcSchema::IfcWallStandardCase(
            guid(),             // GlobalId
            0,                  // OwnerHistory
            std::string("South wall"),  // Name
            boost::none,        // Description
            boost::none,        // ObjectType
            0,                  // ObjectPlacement
            0,                  // Representation
            boost::none             // Tag
        #ifdef USE_IFC4
            , IfcSchema::IfcWallTypeEnum::IfcWallType_STANDARD
        #endif
        );
    

    my creation:

    IfcSchema::IfcBuildingStorey* newFloor = new IfcSchema::IfcBuildingStorey(
            guid(),                     // GlobalID
            0,                          //OwnerHistory
            std::string("floor"),       //Name
            boost::none,                // Description
            boost::none,                // ObjectType
            0,                          // ObjectPlacement
            0,                          // Representation
            boost::none,                // Tag
    #ifdef USE_IFC4
            IfcSchema::IfcElementCompositionEnum::IfcElementComposition_ELEMENT,
    #endif // USE_IFC4
            0);
    

    The example works fine in my code, but my own creation does not function, I presume the composition type is set incorrectly, however I am having trouble finding a solution. Could someone point me in the right direction?

     

    Last edit: jasper van der vaart 2021-12-08
  • jasper van der vaart

    Nevermind, after 1 day of trying i came up with removing the ifdef 5 minutes after posting this post, that resolved the issue!

     

Log in to post a comment.