ifcopenshell.api.group.update_group_products
¶
Module Contents¶
- ifcopenshell.api.group.update_group_products.update_group_products(file: ifcopenshell.file, group: ifcopenshell.entity_instance, products: list[ifcopenshell.entity_instance]) ifcopenshell.entity_instance ¶
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:
ifcopenshell.entity_instance
Example:
group = ifcopenshell.api.group.add_group(model, name="Furniture") ifcopenshell.api.group.update_group_products(model, products=model.by_type("IfcFurniture"), group=group)