ifcopenshell.api.group.update_group_products
¶
Module Contents¶
- ifcopenshell.api.group.update_group_products.update_group_products(file, group=None, products=None) None ¶
Sets a group products to be an explicit list of products
Any previous products assigned to that group will have their assignment removed.
- Parameters:
products (list[ifcopenshell.entity_instance]) – A list of IfcProduct elements to assign to the group
group (ifcopenshell.entity_instance) – The IfcGroup to assign the products to
- Returns:
The IfcRelAssignsToGroup relationship
- Return type:
Example:
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture") ifcopenshell.api.run("group.update_group_products", model, products=model.by_type("IfcFurniture"), group=group)