ifcopenshell.api.system.assign_system

Module Contents

ifcopenshell.api.system.assign_system.assign_system(file: ifcopenshell.file, products: list[ifcopenshell.entity_instance], system: ifcopenshell.entity_instance) None

Assigns distribution elements to a system

Note that it is not necessary to assign distribution ports to a system.

Parameters:
  • products (list[ifcopenshell.entity_instance]) – The list of IfcDistributionElements to assign to the system.

  • system (ifcopenshell.entity_instance) – The IfcSystem you want to assign the element to.

Returns:

The IfcRelAssignsToGroup relationship or None if products was empty list.

Return type:

[ifcopenshell.entity_instance, None]

Example:

# A completely empty distribution system
system = ifcopenshell.api.system.add_system(model)

# Create a duct
duct = ifcopenshell.api.root.create_entity(model,
    ifc_class="IfcDuctSegment", predefined_type="RIGIDSEGMENT")

# This duct is part of the system
ifcopenshell.api.system.assign_system(model, products=[duct], system=system)