ifcopenshell.api.group.update_group_products
#
Module Contents#
- class ifcopenshell.api.group.update_group_products.Usecase(file, group=None, products=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.entity_instance]) – A list of IfcProduct elements to assign to the group
group (ifcopenshell.entity_instance.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)
- execute(self)#