diff --git a/src/ifcopenshell-python/ifcopenshell/__init__.py b/src/ifcopenshell-python/ifcopenshell/__init__.py index 9a31e1b213..962a75a483 100644 --- a/src/ifcopenshell-python/ifcopenshell/__init__.py +++ b/src/ifcopenshell-python/ifcopenshell/__init__.py @@ -21,7 +21,9 @@ Typically used for opening an IFC via a filepath, or accessing one of the submodules. -Example:: +Example: + +.. code:: python import ifcopenshell print(ifcopenshell.version) # v0.7.0-1b1fd1e6 @@ -143,7 +145,9 @@ def create_entity(type, schema="IFC4", *args, **kwargs): :returns: An entity instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python person = ifcopenshell.create_entity("IfcPerson") # #0=IfcPerson($,$,$,$,$,$,$,$) model = ifcopenshell.file() @@ -165,7 +169,9 @@ def register_schema(schema): :param schema: A schema object :type schema: ifcopenshell.express.schema_class.SchemaClass - Example:: + Example: + + .. code:: python schema = ifcopenshell.express.parse("/path/to/ifc-custom.exp") ifcopenshell.register_schema(schema) diff --git a/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py b/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py index b19a7eb983..10ec5076b3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py +++ b/src/ifcopenshell-python/ifcopenshell/api/aggregate/assign_object.py @@ -64,7 +64,9 @@ class Usecase: :return: The IfcRelAggregate relationship instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/aggregate/unassign_object.py b/src/ifcopenshell-python/ifcopenshell/api/aggregate/unassign_object.py index 457026c3d6..6b991051f1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/aggregate/unassign_object.py +++ b/src/ifcopenshell-python/ifcopenshell/api/aggregate/unassign_object.py @@ -43,7 +43,9 @@ class Usecase: whole still contains any other parts. :rtype: ifcopenshell.entity_instance.entity_instance, None - Example:: + Example: + + .. code:: python element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") subelement1 = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuilding") diff --git a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py index a8258b6de9..120139511c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py +++ b/src/ifcopenshell-python/ifcopenshell/api/attribute/edit_attributes.py @@ -36,7 +36,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") ifcopenshell.api.run("attribute.edit_attributes", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py b/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py index d5264ba441..205eba2ce7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py +++ b/src/ifcopenshell-python/ifcopenshell/api/boundary/assign_connection_geometry.py @@ -61,7 +61,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python ifcopenshell.api.run("boundary.assign_connection_geometry", model, rel_space_boundary=element, diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py index c344f03e1f..0682ab7565 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_classification.py @@ -62,7 +62,9 @@ class Usecase: :return: The added IfcClassification element :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Option 1: adding a custom clasification from scratch ifcopenshell.api.run("classification.add_classification", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py index 55fd2ee5de..320825e335 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/add_reference.py @@ -84,7 +84,9 @@ class Usecase: :return: The newly added IfcClassificationReference :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Option 1: adding and assigning a new reference from scratch wall_type = model.by_type("IfcWallType")[0] diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py index 2e8ad38ae9..bd590ddd38 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_classification.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python classification = model.by_type("IfcClassification")[0] # Change the name of the classification system to "Foo" diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py index a483c0c6a8..4b47aebc71 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/edit_reference.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python reference = model.by_type("IfcClassification")[0] # Change the name of the reference to "Foo" diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_classification.py b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_classification.py index 799ef05d00..0bd10eddd1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_classification.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_classification.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python classification = model.by_type("IfcClassification")[0] ifcopenshell.api.run("classification.remove_classification", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py index 9ff9cd22a9..b64dc41e47 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/classification/remove_reference.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python wall_type = model.by_type("IfcWallType")[0] classification = ifcopenshell.api.run("classification.add_classification", diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/add_metric.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/add_metric.py index b0eee618fe..8619b32acb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/add_metric.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/add_metric.py @@ -33,7 +33,9 @@ class Usecase: :return: The newly created IfcMetric entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python objective = ifcopenshell.api.run("constraint.add_objective", model) metric = ifcopenshell.api.run("constraint.add_metric", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/add_objective.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/add_objective.py index 0ba45a7f92..578c7da3de 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/add_objective.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/add_objective.py @@ -32,7 +32,9 @@ class Usecase: :return: The newly created IfcObjective entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a new objective for code compliance requirements objective = ifcopenshell.api.run("constraint.add_objective", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py index 3a25175a87..3bb6c852ba 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_metric.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python objective = ifcopenshell.api.run("constraint.add_objective", model) metric = ifcopenshell.api.run("constraint.add_metric", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py index 14b4986db2..96ac354702 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/edit_objective.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python objective = ifcopenshell.api.run("constraint.add_objective", model) ifcopenshell.api.run("constraint.edit_objective", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_constraint.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_constraint.py index 4142eb38e9..e0c9c1776a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_constraint.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_constraint.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python objective = ifcopenshell.api.run("constraint.add_objective", model) ifcopenshell.api.run("constraint.remove_constraint", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_metric.py b/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_metric.py index b8a7c4b668..e5dfa02dda 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_metric.py +++ b/src/ifcopenshell-python/ifcopenshell/api/constraint/remove_metric.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python objective = ifcopenshell.api.run("constraint.add_objective", model) metric = ifcopenshell.api.run("constraint.add_metric", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py b/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py index 9027b1ae2a..9b0b3788a8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py +++ b/src/ifcopenshell-python/ifcopenshell/api/context/add_context.py @@ -107,7 +107,9 @@ class Usecase: IfcGeometricRepresentationSubContext entity :rtype: ifcopenshell.entity_instance.entity_instance, optional - Example:: + Example: + + .. code:: python # If we plan to store 3D geometry in our IFC model, we have to setup # a "Model" context. diff --git a/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py b/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py index c0d09c32bf..698a8da6ac 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py +++ b/src/ifcopenshell-python/ifcopenshell/api/context/edit_context.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python model = ifcopenshell.api.run("context.add_context", model, context_type="Model") # Revit had a bug where they incorrectly called the body representation a "Facetation" diff --git a/src/ifcopenshell-python/ifcopenshell/api/context/remove_context.py b/src/ifcopenshell-python/ifcopenshell/api/context/remove_context.py index 2fa634f6c8..edd4f1d723 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/context/remove_context.py +++ b/src/ifcopenshell-python/ifcopenshell/api/context/remove_context.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python model = ifcopenshell.api.run("context.add_context", model, context_type="Model") # Revit had a bug where they incorrectly called the body representation a "Facetation" diff --git a/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py b/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py index e3c4b554b1..fd4471c9d8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py +++ b/src/ifcopenshell-python/ifcopenshell/api/control/assign_control.py @@ -43,7 +43,9 @@ class Usecase: :return: The newly created IfcRelAssignsToControl :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # One common usecase is to assign a calendar to a task calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/control/unassign_control.py b/src/ifcopenshell-python/ifcopenshell/api/control/unassign_control.py index 9b5a786311..ce734ab92d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/control/unassign_control.py +++ b/src/ifcopenshell-python/ifcopenshell/api/control/unassign_control.py @@ -33,7 +33,9 @@ class Usecase: IfcRelAssignsToControl is returned, otherwise None. :rtype: ifcopenshell.entity_instance.entity_instance, None - Example:: + Example: + + .. code:: python # Let's relate a cost item and a product wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py index 76e3b95d5e..13b4b41258 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item.py @@ -37,7 +37,9 @@ class Usecase: :return: The newly created IfcCostItem :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # The very first cost item must be in a cost schedule schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item_quantity.py index 1af6266612..3402c1828e 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_item_quantity.py @@ -57,7 +57,9 @@ class Usecase: parameter :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python chair = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture") schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py index cdd2eeb798..1d9882ff45 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_schedule.py @@ -45,7 +45,9 @@ class Usecase: :return: The newly created IfcCostSchedule entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) # Now that we have a cost schedule, we may add cost items to it diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_value.py index 9163685cfc..edc84d7fc3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/add_cost_value.py @@ -50,7 +50,9 @@ class Usecase: :return: The newly created IfcCostValue :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We always need a schedule first prior to adding any cost items schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py index 1114691961..754b8b02ca 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_item_quantity.py @@ -50,7 +50,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_value.py index 74d0c79e00..31f119bbab 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/assign_cost_value.py @@ -41,7 +41,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a schedule of rates with a single rate in it of 5.0 rate_tables = ifcopenshell.api.run("cost.add_cost_schedule", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py index fc7021304f..2787b0048c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/calculate_cost_item_resource_value.py @@ -44,7 +44,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # First, we need a cost schedule and item schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py index 338b66e386..412320b2cb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/copy_cost_item_values.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Assume we have a schedule with multiple items in it schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py index 29d76dc5f9..3b570ef388 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py index 9cc676676f..2684d1e394 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_item_quantity.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py index 627946a657..ab38f62d8e 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_schedule.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) ifcopenshell.api.run("cost.edit_cost_schedule", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py index 75b186f303..818cd4a84b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py index d855d50fdd..ede08a966d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/edit_cost_value_formula.py @@ -39,7 +39,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item.py b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item.py index 31c8a5c5ec..8d4f9c5e8d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item_quantity.py index 9611a234db..bf562c46e7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_item_quantity.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_schedule.py index 69e460d52d..33414bc486 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_schedule.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_value.py b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_value.py index 7f1421462d..6c4a346f02 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_value.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/remove_cost_value.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/cost/unassign_cost_item_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/cost/unassign_cost_item_quantity.py index 004b003346..e4b48bafa0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/cost/unassign_cost_item_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/cost/unassign_cost_item_quantity.py @@ -36,7 +36,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python schedule = ifcopenshell.api.run("cost.add_cost_schedule", model) item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule) diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py b/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py index 0d96ba18a2..7106fe7f7b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/add_information.py @@ -37,7 +37,9 @@ class Usecase: :return: The newly created IfcDocumentInformation entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) # A document typically has a unique drawing or document name (which diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py index f5b24d2cf4..47af28b089 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/add_reference.py @@ -41,7 +41,9 @@ class Usecase: :return: The newly created IfcDocumentReference entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) ifcopenshell.api.run("document.edit_information", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py b/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py index b62d62814b..c7f98e4517 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/assign_document.py @@ -42,7 +42,9 @@ class Usecase: :return: The IfcRelAssociatesDocument relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) ifcopenshell.api.run("document.edit_information", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py b/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py index a511c41c93..5d2665741b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/edit_information.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) ifcopenshell.api.run("document.edit_information", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py index 8c855191a4..98d4a0233a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/edit_reference.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) ifcopenshell.api.run("document.edit_information", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/remove_information.py b/src/ifcopenshell-python/ifcopenshell/api/document/remove_information.py index 4cd18e051a..9506c51478 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/remove_information.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/remove_information.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Add a document document = ifcopenshell.api.run("document.add_information", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/remove_reference.py b/src/ifcopenshell-python/ifcopenshell/api/document/remove_reference.py index 3906cb4e00..5426608257 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/remove_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/remove_reference.py @@ -28,7 +28,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) reference = ifcopenshell.api.run("document.add_reference", model, information=document) diff --git a/src/ifcopenshell-python/ifcopenshell/api/document/unassign_document.py b/src/ifcopenshell-python/ifcopenshell/api/document/unassign_document.py index 802e7c0c33..ebe513d193 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/document/unassign_document.py +++ b/src/ifcopenshell-python/ifcopenshell/api/document/unassign_document.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python document = ifcopenshell.api.run("document.add_information", model) ifcopenshell.api.run("document.edit_information", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/drawing/assign_product.py b/src/ifcopenshell-python/ifcopenshell/api/drawing/assign_product.py index 9ab5e89e9e..11da9c0ee0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/drawing/assign_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/drawing/assign_product.py @@ -49,7 +49,9 @@ class Usecase: :return: The created IfcRelAssignsToProduct relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture") annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation") diff --git a/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py b/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py index e9c34e7da8..c8be879f7f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py +++ b/src/ifcopenshell-python/ifcopenshell/api/drawing/edit_text_literal.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python text = model.createIfcTextLiteral() ifcopenshell.api.run("drawing.edit_text_literal", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/drawing/unassign_product.py b/src/ifcopenshell-python/ifcopenshell/api/drawing/unassign_product.py index 7dd1da8a34..7c86af8463 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/drawing/unassign_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/drawing/unassign_product.py @@ -37,7 +37,9 @@ class Usecase: :return: The created IfcRelAssignsToProduct relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture") annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation") diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py index 7e4941215c..9ed90b6fb7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/add_axis_representation.py @@ -60,7 +60,9 @@ class Usecase: :return: The newly created IfcShapeRepresentation entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python context = ifcopenshell.util.representation.get_context(model, "Plan", "Axis", "GRAPH_VIEW") axis = ifcopenshell.api.run("geometry.add_axis_representation", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/add_georeferencing.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/add_georeferencing.py index cb3d68afb2..a957970a91 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/georeference/add_georeferencing.py +++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/add_georeferencing.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python ifcopenshell.api.run("georeference.add_georeferencing", model) """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py index 62fa266891..9e34626e4a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py +++ b/src/ifcopenshell-python/ifcopenshell/api/georeference/edit_georeferencing.py @@ -52,7 +52,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python ifcopenshell.api.run("georeference.add_georeferencing", model) # This is the simplest scenario, a defined CRS (GDA2020 / MGA Zone diff --git a/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py b/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py index decfb6c466..583ac6c36a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py +++ b/src/ifcopenshell-python/ifcopenshell/api/grid/create_axis_curve.py @@ -39,7 +39,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A pretty standard rectangular grid, with only two axes. grid = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcGrid") diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py index 4b353f27af..fa2877eac5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/add_group.py @@ -39,7 +39,9 @@ class Usecase: :return: The newly created IfcGroup :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python ifcopenshell.api.run("group.add_group", model, Name="Unit 1A") """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py index 4edf5a1eee..450dcd5c20 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/assign_group.py @@ -34,7 +34,9 @@ class Usecase: :return: The IfcRelAssignsToGroup relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python group = ifcopenshell.api.run("group.add_group", model, Name="Furniture") ifcopenshell.api.run("group.assign_group", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py index d7abda228b..442b9d84f6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/edit_group.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A") ifcopenshell.api.run("group.edit_group", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/remove_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/remove_group.py index 94716f66f5..83ddf23851 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/remove_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/remove_group.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A") ifcopenshell.api.run("group.remove_group", model, group=group) diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/unassign_group.py b/src/ifcopenshell-python/ifcopenshell/api/group/unassign_group.py index b8c4a3df6b..cf4fc385bf 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/unassign_group.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/unassign_group.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python group = ifcopenshell.api.run("group.add_group", model, Name="Furniture") furniture = model.by_type("IfcFurniture") diff --git a/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py b/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py index 5fccd4d9e5..a752057f84 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py +++ b/src/ifcopenshell-python/ifcopenshell/api/group/update_group_products.py @@ -34,7 +34,9 @@ class Usecase: :return: The IfcRelAssignsToGroup relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python group = ifcopenshell.api.run("group.add_group", model, Name="Furniture") ifcopenshell.api.run("group.update_group_products", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/assign_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/assign_layer.py index c64e354aed..2cdcb58269 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/assign_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/assign_layer.py @@ -39,7 +39,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Remember, all geometry needs to specify the context it is part of first. # See ifcopenshell.api.context.add_context for details. diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py index 24f1883458..4ac74d4014 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/edit_layer.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL") ifcopenshell.api.run("layer.edit_layer", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/remove_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/remove_layer.py index b9c41e2114..2834d8f8ef 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/remove_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/remove_layer.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL") ifcopenshell.api.run("layer.remove_layer", model, layer=layer) diff --git a/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py b/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py index 7a5750bc60..229c91a012 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/layer/unassign_layer.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Remember, all geometry needs to specify the context it is part of first. # See ifcopenshell.api.context.add_context for details. diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py index 15ab4a78b2..db011f5ca0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/add_library.py @@ -55,7 +55,9 @@ class Usecase: :return: The newly created IfcLibraryInformation :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python ifcopenshell.api.run("library.add_library", model, name="Brickschema") """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/add_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/add_reference.py index 32e8638dbe..1ac3f87eb9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/add_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/add_reference.py @@ -38,7 +38,9 @@ class Usecase: :return: The newly created IfcLibraryReference element :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py index b5b55ecbd5..a1f3f83d17 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/assign_reference.py @@ -35,7 +35,9 @@ class Usecase: :return: The IfcRelAssociatesLibrary relationship entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py index ba563b1d11..a5846f0c9b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/edit_library.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") ifcopenshell.api.run("library.edit_library", model, library=library, diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py index 733fb81cd7..4fb13253a8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/edit_reference.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") # Let's create a reference to a single AHU in our Brickschema dataset diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/remove_library.py b/src/ifcopenshell-python/ifcopenshell/api/library/remove_library.py index 47c72c183e..f6af4d6c3b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/remove_library.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/remove_library.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") ifcopenshell.api.run("library.remove_library", model, library=library) diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/remove_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/remove_reference.py index b106954165..88e267a1c2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/remove_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/remove_reference.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") reference = ifcopenshell.api.run("library.add_reference", model, library=library) diff --git a/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py b/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py index d8db411d07..8fef53ebc3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py +++ b/src/ifcopenshell-python/ifcopenshell/api/library/unassign_reference.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python library = ifcopenshell.api.run("library.add_library", model, name="Brickschema") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py index 577f803810..e3cb94ef95 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_constituent.py @@ -44,7 +44,9 @@ class Usecase: :return: The newly created IfcMaterialConstituent :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a window type that has an aluminium frame # and a glass glazing panel. Notice we are assigning to the type diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py index 6862995879..89c3e6b2a1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_layer.py @@ -42,7 +42,9 @@ class Usecase: :return: The newly created IfcMaterialLayer :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a wall type that has two layers of # gypsum with steel studs inside. Notice we are assigning to diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_list_item.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_list_item.py index 3922d2edd7..4c80a5758c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_list_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_list_item.py @@ -45,7 +45,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a window type that has an aluminium frame # and a glass glazing panel. Notice we are assigning to the type diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py index 9101a66492..07b5882932 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_material.py @@ -55,7 +55,9 @@ class Usecase: :return: The newly created IfcMaterial :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's create two materials with their respective categories concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py index d64eb7ce6e..802d1d38cc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_material_set.py @@ -66,7 +66,9 @@ class Usecase: :return: The newly created material set element :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a wall type that has two layers of # gypsum with steel studs inside. Notice we are assigning to diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py index f6b56bb904..df53de69f8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/add_profile.py @@ -48,7 +48,9 @@ class Usecase: :return: The newly created IfcMaterialProfile :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a steel I-beam. Notice we are assigning to # the type only, as all occurrences of that type will automatically diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py index c9873c3cc7..0c27e4ea46 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py @@ -67,7 +67,9 @@ class Usecase: :return: The IfcRelAssociatesMaterial entity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's start with a simple concrete material concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py index 35837d0915..ac5984b88b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_profile.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a steel I-beam. Notice we are assigning to # the type only, as all occurrences of that type will automatically diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/copy_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/copy_material.py index ac286cdba5..090e99cc24 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/copy_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/copy_material.py @@ -41,7 +41,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") wood = ifcopenshell.api.run("material.add_material", model, name="TIM01", category="wood") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py index 3e0a738cca..3e481d9748 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_assigned_material.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") ifcopenshell.api.run("material.edit_assigned_material", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py index 2933e4fd4e..22660fcb24 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_constituent.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's add two materials aluminium1 = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py index 86640f5343..e3280f5ff1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create two materials typically used for steel stud partition # walls with gypsum lining. diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py index 1b7e9b0549..d6900314ab 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_layer_usage.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's start with a simple concrete material concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py index e9cfd95cea..04de2044cc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile.py @@ -37,7 +37,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a material set to store our profiles. material_set = ifcopenshell.api.run("material.add_profile_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py index 1662189d80..3a7c7493cb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/edit_profile_usage.py @@ -39,7 +39,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a steel I-beam. Notice we are assigning to # the type only, as all occurrences of that type will automatically diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_constituent.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_constituent.py index 32b83e2348..b62d06bee7 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_constituent.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_constituent.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a material set for windows made out of aluminium and glass. material_set = ifcopenshell.api.run("material.add_material_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_layer.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_layer.py index 024792308f..3d6d8b8df6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_layer.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_layer.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a material set for steel stud partition walls. material_set = ifcopenshell.api.run("material.add_material_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_list_item.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_list_item.py index da45d1820f..47269b51dc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_list_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_list_item.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a material list for aluminium windows. material_set = ifcopenshell.api.run("material.add_material_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_material.py index f3d689455a..6d8b4bb6fe 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_material.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a material aluminium = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_material_set.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_material_set.py index be4c0a82eb..b9cb577a89 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_material_set.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_material_set.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a material set material_set = ifcopenshell.api.run("material.add_material_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/remove_profile.py b/src/ifcopenshell-python/ifcopenshell/api/material/remove_profile.py index 419dd93ae6..d7c0ec35fb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/remove_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/remove_profile.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # First, let's create a material set. material_set = ifcopenshell.api.run("material.add_profile_set", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/reorder_set_item.py b/src/ifcopenshell-python/ifcopenshell/api/material/reorder_set_item.py index e726ac695a..cabec2a4ec 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/reorder_set_item.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/reorder_set_item.py @@ -36,7 +36,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python material_set = ifcopenshell.api.run("material.add_material_set", model, name="Window", set_type="IfcMaterialList") diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py index c76aae1e3b..96b211d79f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/unassign_material.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete") diff --git a/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py b/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py index 1b0b6ab669..b88be0f912 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py +++ b/src/ifcopenshell-python/ifcopenshell/api/nest/assign_object.py @@ -80,7 +80,9 @@ class Usecase: :return: The IfcRelNests relationship instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Faucets are designed to attach onto a sink through a predrilled hole. sink = ifcopenshell.api.run("root.create_entity", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py index e25e525e79..9325638d96 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_actor.py @@ -48,7 +48,9 @@ class Usecase: :return: The newly created IfcActor or IfcOccupant :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Setup an organisation with a single role organisation = ifcopenshell.api.run("owner.add_organisation", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py index f9c65048eb..3a9c3e6c14 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_address.py @@ -40,7 +40,9 @@ class Usecase: :return: The new IfcPostalAddress or IfcTelecomAddress :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py index 7c7cc6691e..792096ef9d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_application.py @@ -49,7 +49,9 @@ class Usecase: application intended for computers to read. :type application_identifier: str, optional - Example:: + Example: + + .. code:: python application = ifcopenshell.api.run("owner.add_application", model) """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_organisation.py index 880a71cea3..db4121d9cb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_organisation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_organisation.py @@ -35,7 +35,9 @@ class Usecase: :return: The newly created IfcOrganization :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model, identification="AWB", name="Architects Without Ballpens") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_person.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_person.py index 8d1e7a3742..308d771e21 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_person.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_person.py @@ -34,7 +34,9 @@ class Usecase: :return: The newly created IfcPerson :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python ifcopenshell.api.run("owner.add_person", model, identification="bobthebuilder", family_name="Thebuilder", given_name="Bob") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py index 18950d3dae..05c137b516 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py @@ -32,7 +32,9 @@ class Usecase: :return: The newly created IfcPersonAndOrganization :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python person = ifcopenshell.api.run("owner.add_person", model, identification="lecorbycorbycorb", family_name="Curbosiar", given_name="Le") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/add_role.py b/src/ifcopenshell-python/ifcopenshell/api/owner/add_role.py index 417754cfb1..1a18e3c403 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/add_role.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/add_role.py @@ -38,7 +38,9 @@ class Usecase: :return: The newly created IfcActorRole :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model, identification="AWB", name="Architects Without Ballpens") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/assign_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/assign_actor.py index ec160342d0..395818e922 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/assign_actor.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/assign_actor.py @@ -47,7 +47,9 @@ class Usecase: :return: The newly created IfcRelAssignsToActor relationship. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We need to procure and install 2 of this particular pump type in our facility. pump_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcPumpType") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py b/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py index 0418c0cdc7..194e8812cf 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/create_owner_history.py @@ -62,7 +62,9 @@ class Usecase: :return: The newly created IfcOwnerHistory element. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we're writing a small script, not large enough to be # its own fully branded application. In this case, let's use the diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py index 0260eb46c1..87638e6e44 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_actor.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Setup an organisation with a single role organisation = ifcopenshell.api.run("owner.add_organisation", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py index a608a8bfc7..5ecda0ec03 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_address.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A snail mail address postal = ifcopenshell.api.run("owner.add_address", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py index 715786bbda..03289d6f14 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_organisation.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model, identification="AWB", name="Architects With Ballpens") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py index 6235405e3c..931cdb0c82 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_person.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python person = ifcopenshell.api.run("owner.add_person", model, identification="bobthebuilder", family_name="Thebuilder", given_name="Bob") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py index 69e44d5b41..6e96df744f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/edit_role.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python person = ifcopenshell.api.run("owner.add_person", model, identification="bobthebuilder", family_name="Thebuilder", given_name="Bob") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_actor.py index 4bdc698358..99aa5fe33d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_actor.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_actor.py @@ -28,7 +28,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Setup an organisation with a single role organisation = ifcopenshell.api.run("owner.add_organisation", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_address.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_address.py index 2afda679d7..1bb9247c0d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_address.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_address.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model) address = ifcopenshell.api.run("owner.add_address", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_application.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_application.py index 88d1ff3705..63e8092338 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_application.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_application.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python application = ifcopenshell.api.run("owner.add_application", model) ifcopenshell.api.run("owner.remove_address", model, application=application) diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py index 883028d0b2..e5c7b36d8b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_organisation.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model, identification="AWB", name="Architects Without Ballpens") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py index 9f2bad9e35..af82abf989 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python ifcopenshell.api.run("owner.add_person", model, identification="bobthebuilder", family_name="Thebuilder", given_name="Bob") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person_and_organisation.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person_and_organisation.py index 71cef739c7..6e12917d72 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person_and_organisation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_person_and_organisation.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python person = ifcopenshell.api.run("owner.add_person", model, identification="lecorbycorbycorb", family_name="Curbosiar", given_name="Le") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_role.py b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_role.py index b77a695cc3..3e6a6cc721 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/remove_role.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/remove_role.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python organisation = ifcopenshell.api.run("owner.add_organisation", model, identification="AWB", name="Architects Without Ballpens") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/unassign_actor.py b/src/ifcopenshell-python/ifcopenshell/api/owner/unassign_actor.py index 212dc88995..06b428cd05 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/unassign_actor.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/unassign_actor.py @@ -34,7 +34,9 @@ class Usecase: is no more valid relationship. :rtype: None, ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We need to procure and install 2 of this particular pump type in our facility. pump_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcPumpType") diff --git a/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py b/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py index 7cf3f8ac8d..01f39410d9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py +++ b/src/ifcopenshell-python/ifcopenshell/api/owner/update_owner_history.py @@ -37,7 +37,9 @@ class Usecase: :return: The updated IfcOwnerHistory element. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # See ifcopenshell.api.owner.create_owner_history for setup # [ ... example setup code ... ] diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py index 2fd3cdad63..bcd413cdbf 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/profile/add_arbitrary_profile.py @@ -39,7 +39,9 @@ class Usecase: :return: The newly created IfcArbitraryClosedProfileDef :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A 10mm by 100mm rectangle, such that might be used as a wooden # skirting board or kick plate. diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py index 574dbf7159..6b8c3786c6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/profile/add_parameterized_profile.py @@ -34,7 +34,9 @@ class Usecase: :return: The newly created element depending on the specified ifc_class. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python circle = ifcopenshell.api.run("profile.add_parameterized_profile", model, ifc_class="IfcCircleProfileDef") diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py index 39f309418a..489bf0b5fa 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/profile/edit_profile.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python circle = ifcopenshell.api.run("profile.add_parameterized_profile", model, ifc_class="IfcCircleProfileDef") diff --git a/src/ifcopenshell-python/ifcopenshell/api/profile/remove_profile.py b/src/ifcopenshell-python/ifcopenshell/api/profile/remove_profile.py index 8c80abf951..5b78f67c9a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/profile/remove_profile.py +++ b/src/ifcopenshell-python/ifcopenshell/api/profile/remove_profile.py @@ -26,7 +26,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python circle = ifcopenshell.api.run("profile.add_parameterized_profile", model, ifc_class="IfcCircleProfileDef") diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py index 04060a1605..681e70e9d8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/append_asset.py @@ -47,7 +47,9 @@ class Usecase: :return: The appended element :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Programmatically generate a library. You could do this visually too. library = ifcopenshell.api.run("project.create_file") diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py index 5793673efa..626f4968b4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/assign_declaration.py @@ -43,7 +43,9 @@ class Usecase: :return: The new IfcRelDeclares relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Programmatically generate a library. You could do this visually too. library = ifcopenshell.api.run("project.create_file") diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py b/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py index d1f89fe11e..45ce3d6c6a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/create_file.py @@ -39,7 +39,9 @@ class Usecase: :return: The created IFC file object. :rtype: ifcopenshell.file.file - Example:: + Example: + + .. code:: python # Start a new model. model = ifcopenshell.api.run("project.create_file") diff --git a/src/ifcopenshell-python/ifcopenshell/api/project/unassign_declaration.py b/src/ifcopenshell-python/ifcopenshell/api/project/unassign_declaration.py index 3b5d2e61c0..1bf9541e30 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/project/unassign_declaration.py +++ b/src/ifcopenshell-python/ifcopenshell/api/project/unassign_declaration.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Programmatically generate a library. You could do this visually too. library = ifcopenshell.api.run("project.create_file") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py index a13e2416ce..ac498e413d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/add_pset.py @@ -63,7 +63,9 @@ class Usecase: :return: The newly created IfcPropertySet :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a new wall type. wall_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWallType") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py b/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py index 1f90ffb3d0..110d7238a3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/add_qto.py @@ -61,7 +61,9 @@ class Usecase: :return: The newly created IfcElementQuantity :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we have a new wall. wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py index 03f78e3928..b5d4378d99 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py @@ -77,7 +77,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a new wall type. wall_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWallType") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py index 8d415ac173..820f8d858f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_qto.py @@ -55,7 +55,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a new wall type. wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py index b90e9e2894..4b5d3a1503 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/remove_pset.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we have a new wall type with a property set. wall_type = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWallType") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py index 8fa7939740..569b2bcdd5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_prop_template.py @@ -68,7 +68,9 @@ class Usecase: :return: The newly created IfcSimplePropertyTemplate. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a simple template that may be applied to all types template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_pset_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_pset_template.py index c22fefc6a1..ae37efa128 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_pset_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/add_pset_template.py @@ -82,7 +82,9 @@ class Usecase: :return: The newly created IfcPropertySetTemplate :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a simple template that may be applied to all types ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py index f924e9ca8d..1ddc18f7dc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_prop_template.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py index 7bff8a7ae1..29d99753a4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/edit_pset_template.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Whoops! We named it with a buildingSMART reserved "Pset_" prefix! template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="Pset_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_prop_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_prop_template.py index d23dba7ef2..1bb5650dfc 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_prop_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_prop_template.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_pset_template.py b/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_pset_template.py index 6309d6e841..8c100e830f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_pset_template.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset_template/remove_pset_template.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a template. template = ifcopenshell.api.run("pset_template.add_pset_template", model, name="ABC_RiskFactors") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py index a592a7fbe0..6fa25a0bc9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource.py @@ -60,7 +60,9 @@ class Usecase: class. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_quantity.py index a664f7e29b..55fb80902d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_quantity.py @@ -44,7 +44,9 @@ class Usecase: :return: The newly created quantity depending on the IFC class :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_time.py b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_time.py index ca63c970fb..8407555e35 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/add_resource_time.py @@ -33,7 +33,9 @@ class Usecase: :return: The newly created IfcResourceTime :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py index 060addc0d6..121a565177 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/assign_resource.py @@ -45,7 +45,9 @@ class Usecase: :return: The newly created IfcRelAssignsToResource :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py index 23b793298a..34be65fea5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py index 7802474150..275cd5177b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_quantity.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py index e6cd974ba1..451fb62658 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/edit_resource_time.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource.py index 9676f4d098..e4511708c8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource.py @@ -23,7 +23,9 @@ class Usecase: def __init__(self, file, resource=None): """Removes a resource and all relationships - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource_quantity.py b/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource_quantity.py index 0d6a17712b..afafa9a193 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource_quantity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/remove_resource_quantity.py @@ -23,7 +23,9 @@ class Usecase: def __init__(self, file, resource=None): """Removes the base quantity of a resource - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/resource/unassign_resource.py b/src/ifcopenshell-python/ifcopenshell/api/resource/unassign_resource.py index 1725685fbd..ea07bcf44c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/resource/unassign_resource.py +++ b/src/ifcopenshell-python/ifcopenshell/api/resource/unassign_resource.py @@ -31,7 +31,9 @@ class Usecase: :return: The newly created IfcRelAssignsToResource :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py index 55a2093004..fe66e9f052 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/copy_class.py @@ -53,7 +53,9 @@ class Usecase: :return: The copied product :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We have a wall wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py index ae94b5ef47..0e728be75c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/create_entity.py @@ -47,7 +47,9 @@ class Usecase: :return: The newly created element based on the specified IFC class. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We have a project. ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py index 0726092121..4a8d79c4bb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/reassign_class.py @@ -41,7 +41,9 @@ class Usecase: :return: The newly modified product. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # We have a wall. wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py index 23eae1b3b4..b9da20ec65 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py @@ -37,7 +37,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # We have a wall. wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py index bb7fa42eee..85b59c54c9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task.py @@ -85,7 +85,9 @@ class Usecase: :return: The newly created IfcTask :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task_time.py index 06fd5674b0..5833f67dfe 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_task_time.py @@ -33,7 +33,9 @@ class Usecase: :return: The newly created IfcTaskTime. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. schedule = ifcopenshell.api.run("sequence.add_work_schedule", model, name="Construction Schedule A") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py index 22b9c7db42..4f5be59803 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_time_period.py @@ -50,7 +50,9 @@ class Usecase: :return: The newly created IfcTimePeriod :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py index c1830b0f54..0767ceb51c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_calendar.py @@ -43,7 +43,9 @@ class Usecase: :return: The newly created IfcWorkCalendar :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py index e40ae65f08..76d2133494 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_plan.py @@ -44,7 +44,9 @@ class Usecase: :return: The newly created IfcWorkPlan :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py index 6adbadd8b2..faae1a39b0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_schedule.py @@ -46,7 +46,9 @@ class Usecase: :return: The newly created IfcWorkSchedule :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py index 1996f73305..6afafad753 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/add_work_time.py @@ -38,7 +38,9 @@ class Usecase: :return: The newly created IfcWorkTime :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_lag_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_lag_time.py index f56354ee80..b6ff16bbf2 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_lag_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_lag_time.py @@ -45,7 +45,9 @@ class Usecase: :return: The newly created IfcLagTime :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_process.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_process.py index 4fdc5276df..9d703f65be 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_process.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_process.py @@ -68,7 +68,9 @@ class Usecase: :return: The newly created IfcRelAssignsToProcess relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_product.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_product.py index 9400405760..5e4393457f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_product.py @@ -44,7 +44,9 @@ class Usecase: :return: The newly created IfcRelAssignsToProduct relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_recurrence_pattern.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_recurrence_pattern.py index ad7f8430eb..a940e4f224 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_recurrence_pattern.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_recurrence_pattern.py @@ -66,7 +66,9 @@ class Usecase: :return: The newly created IfcRecurrencePattern :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py index 0abac75830..37be7d83af 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_sequence.py @@ -53,7 +53,9 @@ class Usecase: :return: The newly created IfcRelSequence :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_workplan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_workplan.py index ac0b46beea..b3439e69a6 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_workplan.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/assign_workplan.py @@ -35,7 +35,9 @@ class Usecase: :return: The IfcRelAggregates relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py index b974bf3f0b..671113f9f1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/calculate_task_duration.py @@ -40,7 +40,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Add our own crew crew = ifcopenshell.api.run("resource.add_resource", model, ifc_class="IfcCrewResource") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py index 8101c8badb..d8fc4f4384 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/cascade_schedule.py @@ -46,7 +46,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Define a convenience function to add a task chained to a predecessor def add_task(model, name, predecessor, work_schedule): diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py index 568809de53..5f9a2dfcb4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_lag_time.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py index c34b14208a..53dba8b356 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_recurrence_pattern.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py index 2edeed267f..56c38d52ea 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_sequence.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py index ce7d1b3b7f..d6ffdd5d17 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py index 355a357195..7ccb1056ce 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_task_time.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py index e9b4597c98..cdfec38271 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_calendar.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model, name="5 Day Week") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py index 8873b8d8ef..39c426e2b8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_plan.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py index 4e81dca996..e520b49419 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_schedule.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py index 3bfafc551e..d681daf5ce 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/edit_work_time.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/get_related_products.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/get_related_products.py index db9cc3c48e..b46c17c485 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/get_related_products.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/get_related_products.py @@ -34,7 +34,9 @@ class Usecase: :return: A set of IfcProducts output by the IfcTask. :rtype: set[ifcopenshell.entity_instance.entity_instance] - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py index 8e6adfcf22..c7e911e2d9 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/recalculate_schedule.py @@ -40,7 +40,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # See the example for ifcopenshell.api.sequence.cascade_schedule for # details of how to set up a basic set of tasks and calculate the diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py index da937336fb..2aadb3812a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_task.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_time_period.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_time_period.py index d1c4e3c0a6..925c6289ff 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_time_period.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_time_period.py @@ -28,7 +28,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_calendar.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_calendar.py index a2e7e22899..8fb24bc48e 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_calendar.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_calendar.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model, name="5 Day Week") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py index 7f23d4be6b..7a89293d26 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_plan.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py index d6c956dc63..ee78e99f69 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_schedule.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # This will hold all our construction schedules work_plan = ifcopenshell.api.run("sequence.add_work_plan", model, name="Construction") diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_time.py index 305a6da192..6f8e1d13eb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/remove_work_time.py @@ -26,7 +26,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_lag_time.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_lag_time.py index 85972fd418..94a5fe16fb 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_lag_time.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_lag_time.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_process.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_process.py index dd8e71dac7..d60c891bad 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_process.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_process.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_product.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_product.py index e23257b160..c4d372f686 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_product.py @@ -33,7 +33,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_recurrence_pattern.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_recurrence_pattern.py index 1dbb149b4d..5c46e3e51c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_recurrence_pattern.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_recurrence_pattern.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's create a new calendar. calendar = ifcopenshell.api.run("sequence.add_work_calendar", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_sequence.py b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_sequence.py index f12c36fd4d..481a77831b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_sequence.py +++ b/src/ifcopenshell-python/ifcopenshell/api/sequence/unassign_sequence.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Let's imagine we are creating a construction schedule. All tasks # need to be part of a work schedule. diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py index 63dd26ae10..d21e91f6f0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py +++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/assign_container.py @@ -68,7 +68,9 @@ class Usecase: :return: The IfcRelContainedInSpatialStructure relationship instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") site = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/dereference_structure.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/dereference_structure.py index 0d3e100383..a919d2195d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/spatial/dereference_structure.py +++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/dereference_structure.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") site = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py index b98d243f0d..4a8997a847 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py +++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/reference_structure.py @@ -47,7 +47,9 @@ class Usecase: :return: The IfcRelContainedInSpatialStructure relationship instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") site = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/remove_container.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/remove_container.py index b8417b3143..55bdf637ee 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/spatial/remove_container.py +++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/remove_container.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") site = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/spatial/unassign_container.py b/src/ifcopenshell-python/ifcopenshell/api/spatial/unassign_container.py index 6bf7a7cbd1..b82d575473 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/spatial/unassign_container.py +++ b/src/ifcopenshell-python/ifcopenshell/api/spatial/unassign_container.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") site = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite") diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_analysis_model.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_analysis_model.py index 88e29d2924..97e85464b8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_analysis_model.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_analysis_model.py @@ -33,7 +33,9 @@ class Usecase: :return: The newly created IfcStructuralAnalysisModel :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a fresh blank structural analysis analysis = ifcopenshell.api.run("structural.add_structural_analysis_model", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py index 0a90ead3c5..701274f992 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_boundary_condition.py @@ -39,7 +39,9 @@ class Usecase: :return: The newly created IfcBoundaryCondition :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python ifcopenshell.api.run("structural.add_structural_boundary_condition", model, connection=connection) """ diff --git a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py index 115ac700c2..c7d73bef6f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py +++ b/src/ifcopenshell-python/ifcopenshell/api/structural/add_structural_load.py @@ -36,7 +36,9 @@ class Usecase: specified. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a simple linear load ifcopenshell.api.run("structural.add_structural_load", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py index 40682c8fec..575548287b 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_style.py @@ -48,7 +48,9 @@ class Usecase: ifc_class. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py index ee76d41419..f3d97946f8 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/add_surface_style.py @@ -80,7 +80,9 @@ class Usecase: ifc_class. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py index 152d9f42c7..921be2e1a3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/assign_material_style.py @@ -45,7 +45,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A model context is needed to store 3D geometry model3d = ifcopenshell.api.run("context.add_context", model, context_type="Model") diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py b/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py index 52db9b9c73..9c6cacb206 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/assign_representation_styles.py @@ -50,7 +50,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A model context is needed to store 3D geometry model3d = ifcopenshell.api.run("context.add_context", model, context_type="Model") diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py index 119159d9a8..7c928e294f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/edit_presentation_style.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py index f908727083..f0c2447d16 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/edit_surface_style.py @@ -39,7 +39,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py index 64419b6e0c..c9c9c76a95 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/remove_style.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/style/remove_surface_style.py b/src/ifcopenshell-python/ifcopenshell/api/style/remove_surface_style.py index 476f4f1a36..809862c8ed 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/style/remove_surface_style.py +++ b/src/ifcopenshell-python/ifcopenshell/api/style/remove_surface_style.py @@ -28,7 +28,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a new surface style style = ifcopenshell.api.run("style.add_style", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py index ac2173edae..d0512c3cd3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/add_port.py @@ -39,7 +39,9 @@ class Usecase: :return: The newly created IfcDistributionPort :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a duct duct = ifcopenshell.api.run("root.create_entity", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/add_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/add_system.py index f6bab8e2e8..ed0152efe5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/add_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/add_system.py @@ -38,7 +38,9 @@ class Usecase: :return: The newly created IfcSystem. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py index 123750bf58..91a1ce91be 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_port.py @@ -37,7 +37,9 @@ class Usecase: IfcRelConnectsPortToElement for IFC2X3. :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Create a duct duct = ifcopenshell.api.run("root.create_entity", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py index ad4786c030..d21e2b88e0 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/assign_system.py @@ -34,7 +34,9 @@ class Usecase: :return: The IfcRelAssignsToGroup relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py index 1fd563bc3e..20380d9dc4 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/connect_port.py @@ -62,7 +62,9 @@ class Usecase: fittings are less important. :type element: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py index 5087be9d41..1ff6609ce1 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/disconnect_port.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py index d5af6f1875..fefdfa0f58 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/edit_system.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/remove_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/remove_system.py index 1fafb1e791..bbde6b5c58 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/remove_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/remove_system.py @@ -28,7 +28,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_port.py b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_port.py index d46a08d9e8..f9c151c348 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_port.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_port.py @@ -35,7 +35,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a duct duct = ifcopenshell.api.run("root.create_entity", model, diff --git a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py index 531cbc7947..5ead349991 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py +++ b/src/ifcopenshell-python/ifcopenshell/api/system/unassign_system.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A completely empty distribution system system = ifcopenshell.api.run("system.add_system", model) diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py index 152c593033..33bc25ab72 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py +++ b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py @@ -90,7 +90,9 @@ class Usecase: :return: The IfcRelDefinesByType relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A furniture type. This would correlate to a particular model in a # manufacturer's catalogue. Like an Ikea sofa :) diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py b/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py index f07f63eae2..b8480dc211 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py +++ b/src/ifcopenshell-python/ifcopenshell/api/type/map_type_representations.py @@ -36,7 +36,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A furniture type. This would correlate to a particular model in a # manufacturer's catalogue. Like an Ikea sofa :) diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/unassign_type.py b/src/ifcopenshell-python/ifcopenshell/api/type/unassign_type.py index 9072909ff4..f302932c9c 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/type/unassign_type.py +++ b/src/ifcopenshell-python/ifcopenshell/api/type/unassign_type.py @@ -29,7 +29,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # A furniture type. This would correlate to a particular model in a # manufacturer's catalogue. Like an Ikea sofa :) diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_context_dependent_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_context_dependent_unit.py index 9eedfa3570..631daaa99d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_context_dependent_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_context_dependent_unit.py @@ -45,7 +45,9 @@ class Usecase: :return: The new IfcContextDependentUnit :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Boxes of things ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="BOXES") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py index 2a854eece2..8908c9b51f 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_conversion_based_unit.py @@ -46,7 +46,9 @@ class Usecase: IfcConversionBasedUnitWithOffset :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Some common imperial measurements length = ifcopenshell.api.run("unit.add_conversion_based_unit", model, name="inch") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_monetary_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_monetary_unit.py index 924f03c819..fb15af4cd5 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_monetary_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_monetary_unit.py @@ -30,7 +30,9 @@ class Usecase: :return: The newly created IfcMonetaryUnit :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # If you do all your cost plans in Zimbabwean dollars then nobody # knows how accurate the numbers are. diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py index 1f0aac575a..82a7b5f66a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/add_si_unit.py @@ -45,7 +45,9 @@ class Usecase: :return: The newly created IfcSIUnit :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # Millimeters and square meters length = ifcopenshell.api.run("unit.add_si_unit", model, unit_type="LENGTHUNIT", prefix="MILLI") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py index 632167d2e8..e8e4bbfb98 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/assign_unit.py @@ -40,7 +40,9 @@ class Usecase: :return: The IfcUnitAssignment element :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # You need a project before you can assign units. ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py index 1862d1322a..9f27e20d96 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_monetary_unit.py @@ -31,7 +31,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # If you do all your cost plans in Zimbabwean dollars then nobody # knows how accurate the numbers are. diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py index f064ed9280..c4652ba55a 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/edit_named_unit.py @@ -34,7 +34,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Boxes of things unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="BOXES") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py index 03fc0d96da..361cfbd0c3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/remove_unit.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # What? unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="HANDFULS") diff --git a/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py b/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py index 3a851ac013..0876921d84 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py +++ b/src/ifcopenshell-python/ifcopenshell/api/unit/unassign_unit.py @@ -26,7 +26,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # You need a project before you can assign units. ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject") diff --git a/src/ifcopenshell-python/ifcopenshell/api/void/add_filling.py b/src/ifcopenshell-python/ifcopenshell/api/void/add_filling.py index 712a172d2a..3f8ed9340d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/void/add_filling.py +++ b/src/ifcopenshell-python/ifcopenshell/api/void/add_filling.py @@ -36,7 +36,9 @@ class Usecase: :return: The new IfcRelFillsElement relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A bit of preparation, let's create some geometric contexts since # we want to create some geometry for our wall and opening. diff --git a/src/ifcopenshell-python/ifcopenshell/api/void/add_opening.py b/src/ifcopenshell-python/ifcopenshell/api/void/add_opening.py index 350b50b13f..e3abf67a9d 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/void/add_opening.py +++ b/src/ifcopenshell-python/ifcopenshell/api/void/add_opening.py @@ -54,7 +54,9 @@ class Usecase: :return: The new IfcRelVoidsElement relationship :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python # A bit of preparation, let's create some geometric contexts since # we want to create some geometry for our wall and opening. diff --git a/src/ifcopenshell-python/ifcopenshell/api/void/remove_filling.py b/src/ifcopenshell-python/ifcopenshell/api/void/remove_filling.py index f79f2d05fd..f8cefdfc9e 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/void/remove_filling.py +++ b/src/ifcopenshell-python/ifcopenshell/api/void/remove_filling.py @@ -30,7 +30,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create a wall wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") diff --git a/src/ifcopenshell-python/ifcopenshell/api/void/remove_opening.py b/src/ifcopenshell-python/ifcopenshell/api/void/remove_opening.py index 5100c73ba8..566416c8fd 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/void/remove_opening.py +++ b/src/ifcopenshell-python/ifcopenshell/api/void/remove_opening.py @@ -32,7 +32,9 @@ class Usecase: :return: None :rtype: None - Example:: + Example: + + .. code:: python # Create an oprhaned opening. Note that an orphaned opening is # invalid, as an opening can only exist when voiding another diff --git a/src/ifcopenshell-python/ifcopenshell/entity_instance.py b/src/ifcopenshell-python/ifcopenshell/entity_instance.py index de3d932b7d..ca27a391b0 100644 --- a/src/ifcopenshell-python/ifcopenshell/entity_instance.py +++ b/src/ifcopenshell-python/ifcopenshell/entity_instance.py @@ -93,7 +93,9 @@ class entity_instance(object): An instantiated entity_instance will have methods of Python and the IFC class itself. - Example:: + Example: + + .. code:: python ifc_file = ifcopenshell.open(file_path) products = ifc_file.by_type("IfcProduct") @@ -268,7 +270,9 @@ class entity_instance(object): :returns: Either the name of the class, or a boolean if it passes the check :rtype: string|bool - Example:: + Example: + + .. code:: python f = ifcopenshell.file() f.create_entity('IfcPerson') @@ -342,7 +346,9 @@ class entity_instance(object): :returns: A dictionary of properties and their corresponding values :rtype: dict - Example:: + Example: + + .. code:: python ifc_file = ifcopenshell.open(file_path) products = ifc_file.by_type("IfcProduct") diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 855b32a9b9..fdac8941be 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -180,7 +180,9 @@ class file(object): Class has instance methods for filtering by element Id, Type, etc. Instantiated objects can be subscripted by Id or Guid - Example:: + Example: + + .. code:: python ifc_file = ifcopenshell.open(file_path) products = ifc_file.by_type("IfcProduct") @@ -247,7 +249,9 @@ class file(object): :returns: An entity instance :rtype: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python f = ifcopenshell.file() f.create_entity("IfcPerson") diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index af89a2e15d..7cc76f8688 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -28,7 +28,9 @@ def get_psets(element, psets_only=False, qtos_only=False, should_inherit=True): :param should_inherit: Default as True. Set to false if you don't want to inherit property sets from the Type. :return: dictionnary: key, value pair of psets' names and their properties' names & values - Example:: + Example: + + .. code:: python element = ifcopenshell.by_type("IfcBuildingElement")[0] psets = ifcopenshell.util.element.get_psets(element, psets_only=True) qsets = ifcopenshell.util.element.get_psets(element, qtos_only=True) @@ -124,7 +126,9 @@ def get_predefined_type(element): :param element: The IFC Element entity :return: The predefined type of the element - Example:: + Example: + + .. code:: python element = ifcopenshell.by_type("IfcWall")[0] predefined_type = ifcopenshell.util.element.get_predefined_type(element) """ @@ -148,7 +152,9 @@ def get_type(element): :param element: The IFC Element entity :return: The Element Type entity defining the element - Example:: + Example: + + .. code:: python element = ifcopenshell.by_type("IfcWall")[0] element_type = ifcopenshell.util.element.get_type(element) """ @@ -197,7 +203,9 @@ def get_elements_by_material(ifc_file, material): :param material: The IFC Material entity :return: A list of elements using the to the material - Example:: + Example: + + .. code:: python material = file.by_type("IfcMaterial")[0] elements = ifcopenshell.util.element.get_elements_by_material(file, material) @@ -232,7 +240,9 @@ def get_elements_by_style(ifc_file, style): :param style: The IFC Style entity :return: The elements related to the style - Example:: + Example: + + .. code:: python style = file.by_type("IfcSurfaceStyle")[0] elements = ifcopenshell.util.element.get_elements_by_style(file, style) @@ -309,7 +319,9 @@ def get_container(element, should_get_direct=False): :type should_get_direct: bool :return: The direct or indirect container of the element or None. - Example:: + Example: + + .. code:: python element = file.by_type("IfcWall")[0] container = ifcopenshell.util.element.get_container(element) @@ -334,7 +346,9 @@ def get_referenced_structures(element): :param element: The IFC element :type element: ifcopenshell.entity_instance.entity_instance - Example:: + Example: + + .. code:: python element = file.by_type("IfcWall")[0] print(ifcopenshell.util.element.get_referenced_structures(element)) @@ -353,7 +367,9 @@ def get_decomposition(element): :param element: The IFC element :return: The decomposition of the element - Example:: + Example: + + .. code:: python element = file.by_type("IfcProject")[0] decomposition = ifcopenshell.util.element.get_decomposition(element) @@ -384,7 +400,9 @@ def get_grouped_by(element): :param element: The IFC element :return: All subelements of the group - Example:: + Example: + + .. code:: python element = file.by_type("IfcGroup")[0] subelements = ifcopenshell.util.element.get_group(element) @@ -406,7 +424,9 @@ def get_aggregate(element): :param element: The IFC element :return: The aggregate of the element - Example:: + Example: + + .. code:: python element = file.by_type("IfcBeam")[0] aggregate = ifcopenshell.util.element.get_aggregate(element) @@ -422,7 +442,9 @@ def get_parts(element): :param element: The IFC element :return: The parts of the element - Example:: + Example: + + .. code:: python element = file.by_type("IfcElementAssembly")[0] parts = ifcopenshell.util.element.get_parts(element) diff --git a/src/ifcopenshell-python/ifcopenshell/util/unit.py b/src/ifcopenshell-python/ifcopenshell/util/unit.py index 59928a7412..c527f31b86 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/unit.py +++ b/src/ifcopenshell-python/ifcopenshell/util/unit.py @@ -469,7 +469,9 @@ def convert(value, from_prefix, from_unit, to_prefix, to_unit): def calculate_unit_scale(file): """Returns a unit scale factor to convert to and from IFC project length units and SI meters - Example:: + Example: + + .. code:: python ifc_project_length * unit_scale = si_meters si_meters / unit_scale = ifc_project_length