Write documentation for resource API module

This commit is contained in:
Dion Moult
2022-12-16 15:07:02 +11:00
parent d2fee728f2
commit 436482532d
13 changed files with 386 additions and 56 deletions
@@ -53,8 +53,7 @@ class Usecase:
# Setup an organisation with a single role
organisation = ifcopenshell.api.run("owner.add_organisation", model,
identification="AWB", name="Architects Without Ballpens")
role = ifcopenshell.api.run("owner.add_role", model, assigned_object=organisation)
ifcopenshell.api.run("owner.edit_role", model, role=role, attributes={"Role": "ARCHITECT"})
role = ifcopenshell.api.run("owner.add_role", model, assigned_object=organisation, role="ARCHITECT")
# Assign that organisation to a newly created actor
actor = ifcopenshell.api.run("owner.add_actor", model, actor=organisation)
@@ -31,11 +31,14 @@ class Usecase:
Here are a list of objects you may assign an actor to:
- IfcControl: Indicates project directives issued by the actor.
- IfcGroup: Indicates groups for which the actor is responsible.
- IfcProduct: Indicates products for which the actor is responsible.
- IfcProcess: Indicates processes for which the actor is responsible.
- IfcResource: Indicates resources for which the actor is responsible.
* IfcControl: Indicates project directives issued by the actor.
* IfcGroup: Indicates groups for which the actor is responsible.
* IfcProduct: Indicates products for which the actor is responsible.
* IfcProcess: Indicates processes for which the actor is responsible.
* IfcResource: Indicates resources for which the actor is responsible to
allocate, manage, or delegate. This is not the actor actually using
the resource or performing the work. For that type of actor, see
ifcopenshell.api.resource.assign_resource.
:param relating_actor: The IfcActor who is responsible for the object.
:type relating_actor: ifcopenshell.entity_instance.entity_instance