ifcopenshell.api.structural.assign_to_building¶
Module Contents¶
- ifcopenshell.api.structural.assign_to_building.assign_to_building(file: ifcopenshell.file, structural_analysis_model: ifcopenshell.entity_instance, building: ifcopenshell.entity_instance) ifcopenshell.entity_instance¶
Associates a structural analysis model with a building via IfcRelServicesBuildings
The existing
assign_structural_analysis_model()handles IfcRelAssignsToGroup (linking structural members to the analysis model). This function handles the separate model-to-building relationship, which records which building the structural analysis model serves.- Parameters:
structural_analysis_model – The IfcStructuralAnalysisModel to associate with the building.
building – The IfcBuilding (or other IfcSpatialStructureElement) that the structural analysis model serves.
- Returns:
The IfcRelServicesBuildings relationship.
Example:
building = ifcopenshell.util.selector.filter_elements(model, "IfcBuilding")[0] model_ = ifcopenshell.api.structural.add_structural_analysis_model(model) ifcopenshell.api.structural.assign_to_building(model, structural_analysis_model=model_, building=building)