ifcopenshell.api.group.assign_group#

Module Contents#

class ifcopenshell.api.group.assign_group.Usecase(file, products=None, group=None)#

Assigns products to a group

If a product is already assigned to the group, it will not be assigned twice.

Parameters
Returns

The IfcRelAssignsToGroup relationship

Return type

ifcopenshell.entity_instance.entity_instance

Example:

group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
ifcopenshell.api.run("group.assign_group", model,
    products=model.by_type("IfcFurniture"), group=group)
execute(self)#