mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 19:56:20 +00:00
Make syntax highlighting explicit in docs
This commit is contained in:
@@ -21,7 +21,9 @@
|
|||||||
Typically used for opening an IFC via a filepath, or accessing one of the
|
Typically used for opening an IFC via a filepath, or accessing one of the
|
||||||
submodules.
|
submodules.
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
import ifcopenshell
|
import ifcopenshell
|
||||||
print(ifcopenshell.version) # v0.7.0-1b1fd1e6
|
print(ifcopenshell.version) # v0.7.0-1b1fd1e6
|
||||||
@@ -143,7 +145,9 @@ def create_entity(type, schema="IFC4", *args, **kwargs):
|
|||||||
:returns: An entity instance
|
:returns: An entity instance
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
person = ifcopenshell.create_entity("IfcPerson") # #0=IfcPerson($,$,$,$,$,$,$,$)
|
person = ifcopenshell.create_entity("IfcPerson") # #0=IfcPerson($,$,$,$,$,$,$,$)
|
||||||
model = ifcopenshell.file()
|
model = ifcopenshell.file()
|
||||||
@@ -165,7 +169,9 @@ def register_schema(schema):
|
|||||||
:param schema: A schema object
|
:param schema: A schema object
|
||||||
:type schema: ifcopenshell.express.schema_class.SchemaClass
|
:type schema: ifcopenshell.express.schema_class.SchemaClass
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schema = ifcopenshell.express.parse("/path/to/ifc-custom.exp")
|
schema = ifcopenshell.express.parse("/path/to/ifc-custom.exp")
|
||||||
ifcopenshell.register_schema(schema)
|
ifcopenshell.register_schema(schema)
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAggregate relationship instance
|
:return: The IfcRelAggregate relationship instance
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject")
|
project = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcProject")
|
||||||
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
|
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ class Usecase:
|
|||||||
whole still contains any other parts.
|
whole still contains any other parts.
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance, None
|
:rtype: ifcopenshell.entity_instance.entity_instance, None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
|
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSite")
|
||||||
subelement1 = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuilding")
|
subelement1 = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBuilding")
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
|
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
|
||||||
ifcopenshell.api.run("attribute.edit_attributes", model,
|
ifcopenshell.api.run("attribute.edit_attributes", model,
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
ifcopenshell.api.run("boundary.assign_connection_geometry", model,
|
ifcopenshell.api.run("boundary.assign_connection_geometry", model,
|
||||||
rel_space_boundary=element,
|
rel_space_boundary=element,
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ class Usecase:
|
|||||||
:return: The added IfcClassification element
|
:return: The added IfcClassification element
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Option 1: adding a custom clasification from scratch
|
# Option 1: adding a custom clasification from scratch
|
||||||
ifcopenshell.api.run("classification.add_classification", model,
|
ifcopenshell.api.run("classification.add_classification", model,
|
||||||
|
|||||||
@@ -84,7 +84,9 @@ class Usecase:
|
|||||||
:return: The newly added IfcClassificationReference
|
:return: The newly added IfcClassificationReference
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Option 1: adding and assigning a new reference from scratch
|
# Option 1: adding and assigning a new reference from scratch
|
||||||
wall_type = model.by_type("IfcWallType")[0]
|
wall_type = model.by_type("IfcWallType")[0]
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
classification = model.by_type("IfcClassification")[0]
|
classification = model.by_type("IfcClassification")[0]
|
||||||
# Change the name of the classification system to "Foo"
|
# Change the name of the classification system to "Foo"
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
reference = model.by_type("IfcClassification")[0]
|
reference = model.by_type("IfcClassification")[0]
|
||||||
# Change the name of the reference to "Foo"
|
# Change the name of the reference to "Foo"
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
classification = model.by_type("IfcClassification")[0]
|
classification = model.by_type("IfcClassification")[0]
|
||||||
ifcopenshell.api.run("classification.remove_classification", model,
|
ifcopenshell.api.run("classification.remove_classification", model,
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
wall_type = model.by_type("IfcWallType")[0]
|
wall_type = model.by_type("IfcWallType")[0]
|
||||||
classification = ifcopenshell.api.run("classification.add_classification",
|
classification = ifcopenshell.api.run("classification.add_classification",
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcMetric entity
|
:return: The newly created IfcMetric entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcObjective entity
|
:return: The newly created IfcObjective entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a new objective for code compliance requirements
|
# Create a new objective for code compliance requirements
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
ifcopenshell.api.run("constraint.edit_objective", model,
|
ifcopenshell.api.run("constraint.edit_objective", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
ifcopenshell.api.run("constraint.remove_constraint", model,
|
ifcopenshell.api.run("constraint.remove_constraint", model,
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
objective = ifcopenshell.api.run("constraint.add_objective", model)
|
||||||
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
metric = ifcopenshell.api.run("constraint.add_metric", model,
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ class Usecase:
|
|||||||
IfcGeometricRepresentationSubContext entity
|
IfcGeometricRepresentationSubContext entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance, optional
|
: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
|
# If we plan to store 3D geometry in our IFC model, we have to setup
|
||||||
# a "Model" context.
|
# a "Model" context.
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
|
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
|
||||||
# Revit had a bug where they incorrectly called the body representation a "Facetation"
|
# Revit had a bug where they incorrectly called the body representation a "Facetation"
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
|
model = ifcopenshell.api.run("context.add_context", model, context_type="Model")
|
||||||
# Revit had a bug where they incorrectly called the body representation a "Facetation"
|
# Revit had a bug where they incorrectly called the body representation a "Facetation"
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcRelAssignsToControl
|
:return: The newly created IfcRelAssignsToControl
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# One common usecase is to assign a calendar to a task
|
# One common usecase is to assign a calendar to a task
|
||||||
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
|
calendar = ifcopenshell.api.run("sequence.add_work_calendar", model)
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
IfcRelAssignsToControl is returned, otherwise None.
|
IfcRelAssignsToControl is returned, otherwise None.
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance, None
|
:rtype: ifcopenshell.entity_instance.entity_instance, None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's relate a cost item and a product
|
# Let's relate a cost item and a product
|
||||||
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
|
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcCostItem
|
:return: The newly created IfcCostItem
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# The very first cost item must be in a cost schedule
|
# The very first cost item must be in a cost schedule
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ class Usecase:
|
|||||||
parameter
|
parameter
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
chair = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
chair = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcCostSchedule entity
|
:return: The newly created IfcCostSchedule entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
# Now that we have a cost schedule, we may add cost items to it
|
# Now that we have a cost schedule, we may add cost items to it
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcCostValue
|
:return: The newly created IfcCostValue
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# We always need a schedule first prior to adding any cost items
|
# We always need a schedule first prior to adding any cost items
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
|
|||||||
@@ -50,7 +50,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's create a schedule of rates with a single rate in it of 5.0
|
# 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,
|
rate_tables = ifcopenshell.api.run("cost.add_cost_schedule", model,
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# First, we need a cost schedule and item
|
# First, we need a cost schedule and item
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Assume we have a schedule with multiple items in it
|
# Assume we have a schedule with multiple items in it
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
ifcopenshell.api.run("cost.edit_cost_schedule", model,
|
ifcopenshell.api.run("cost.edit_cost_schedule", model,
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
schedule = ifcopenshell.api.run("cost.add_cost_schedule", model)
|
||||||
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
item = ifcopenshell.api.run("cost.add_cost_item", model, cost_schedule=schedule)
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcDocumentInformation entity
|
:return: The newly created IfcDocumentInformation entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
# A document typically has a unique drawing or document name (which
|
# A document typically has a unique drawing or document name (which
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcDocumentReference entity
|
:return: The newly created IfcDocumentReference entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
ifcopenshell.api.run("document.edit_information", model,
|
ifcopenshell.api.run("document.edit_information", model,
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAssociatesDocument relationship
|
:return: The IfcRelAssociatesDocument relationship
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
ifcopenshell.api.run("document.edit_information", model,
|
ifcopenshell.api.run("document.edit_information", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
ifcopenshell.api.run("document.edit_information", model,
|
ifcopenshell.api.run("document.edit_information", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
ifcopenshell.api.run("document.edit_information", model,
|
ifcopenshell.api.run("document.edit_information", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Add a document
|
# Add a document
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
reference = ifcopenshell.api.run("document.add_reference", model, information=document)
|
reference = ifcopenshell.api.run("document.add_reference", model, information=document)
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
document = ifcopenshell.api.run("document.add_information", model)
|
document = ifcopenshell.api.run("document.add_information", model)
|
||||||
ifcopenshell.api.run("document.edit_information", model,
|
ifcopenshell.api.run("document.edit_information", model,
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ class Usecase:
|
|||||||
:return: The created IfcRelAssignsToProduct relationship
|
:return: The created IfcRelAssignsToProduct relationship
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
||||||
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
|
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
text = model.createIfcTextLiteral()
|
text = model.createIfcTextLiteral()
|
||||||
ifcopenshell.api.run("drawing.edit_text_literal", model,
|
ifcopenshell.api.run("drawing.edit_text_literal", model,
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Usecase:
|
|||||||
:return: The created IfcRelAssignsToProduct relationship
|
:return: The created IfcRelAssignsToProduct relationship
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
furniture = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcFurniture")
|
||||||
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
|
annotation = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcAnnotation")
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcShapeRepresentation entity
|
:return: The newly created IfcShapeRepresentation entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
context = ifcopenshell.util.representation.get_context(model, "Plan", "Axis", "GRAPH_VIEW")
|
context = ifcopenshell.util.representation.get_context(model, "Plan", "Axis", "GRAPH_VIEW")
|
||||||
axis = ifcopenshell.api.run("geometry.add_axis_representation", model,
|
axis = ifcopenshell.api.run("geometry.add_axis_representation", model,
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
ifcopenshell.api.run("georeference.add_georeferencing", model)
|
ifcopenshell.api.run("georeference.add_georeferencing", model)
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
ifcopenshell.api.run("georeference.add_georeferencing", model)
|
ifcopenshell.api.run("georeference.add_georeferencing", model)
|
||||||
# This is the simplest scenario, a defined CRS (GDA2020 / MGA Zone
|
# This is the simplest scenario, a defined CRS (GDA2020 / MGA Zone
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# A pretty standard rectangular grid, with only two axes.
|
# A pretty standard rectangular grid, with only two axes.
|
||||||
grid = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcGrid")
|
grid = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcGrid")
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcGroup
|
:return: The newly created IfcGroup
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAssignsToGroup relationship
|
:return: The IfcRelAssignsToGroup relationship
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
||||||
ifcopenshell.api.run("group.assign_group", model,
|
ifcopenshell.api.run("group.assign_group", model,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
||||||
ifcopenshell.api.run("group.edit_group", model,
|
ifcopenshell.api.run("group.edit_group", model,
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
group = ifcopenshell.api.run("group.add_group", model, Name="Unit 1A")
|
||||||
ifcopenshell.api.run("group.remove_group", model, group=group)
|
ifcopenshell.api.run("group.remove_group", model, group=group)
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
||||||
furniture = model.by_type("IfcFurniture")
|
furniture = model.by_type("IfcFurniture")
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAssignsToGroup relationship
|
:return: The IfcRelAssignsToGroup relationship
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
group = ifcopenshell.api.run("group.add_group", model, Name="Furniture")
|
||||||
ifcopenshell.api.run("group.update_group_products", model,
|
ifcopenshell.api.run("group.update_group_products", model,
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Remember, all geometry needs to specify the context it is part of first.
|
# Remember, all geometry needs to specify the context it is part of first.
|
||||||
# See ifcopenshell.api.context.add_context for details.
|
# See ifcopenshell.api.context.add_context for details.
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
|
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
|
||||||
ifcopenshell.api.run("layer.edit_layer", model,
|
ifcopenshell.api.run("layer.edit_layer", model,
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
|
layer = ifcopenshell.api.run("layer.add_layer", model, Name="AI-WALL")
|
||||||
ifcopenshell.api.run("layer.remove_layer", model, layer=layer)
|
ifcopenshell.api.run("layer.remove_layer", model, layer=layer)
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Remember, all geometry needs to specify the context it is part of first.
|
# Remember, all geometry needs to specify the context it is part of first.
|
||||||
# See ifcopenshell.api.context.add_context for details.
|
# See ifcopenshell.api.context.add_context for details.
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcLibraryInformation
|
:return: The newly created IfcLibraryInformation
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcLibraryReference element
|
:return: The newly created IfcLibraryReference element
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAssociatesLibrary relationship entity
|
:return: The IfcRelAssociatesLibrary relationship entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
ifcopenshell.api.run("library.edit_library", model, library=library,
|
ifcopenshell.api.run("library.edit_library", model, library=library,
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
# Let's create a reference to a single AHU in our Brickschema dataset
|
# Let's create a reference to a single AHU in our Brickschema dataset
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
ifcopenshell.api.run("library.remove_library", model, library=library)
|
ifcopenshell.api.run("library.remove_library", model, library=library)
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
reference = ifcopenshell.api.run("library.add_reference", model, library=library)
|
reference = ifcopenshell.api.run("library.add_reference", model, library=library)
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
library = ifcopenshell.api.run("library.add_library", model, name="Brickschema")
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcMaterialConstituent
|
:return: The newly created IfcMaterialConstituent
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a window type that has an aluminium frame
|
# 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
|
# and a glass glazing panel. Notice we are assigning to the type
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcMaterialLayer
|
:return: The newly created IfcMaterialLayer
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a wall type that has two layers of
|
# Let's imagine we have a wall type that has two layers of
|
||||||
# gypsum with steel studs inside. Notice we are assigning to
|
# gypsum with steel studs inside. Notice we are assigning to
|
||||||
|
|||||||
@@ -45,7 +45,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a window type that has an aluminium frame
|
# 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
|
# and a glass glazing panel. Notice we are assigning to the type
|
||||||
|
|||||||
@@ -55,7 +55,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcMaterial
|
:return: The newly created IfcMaterial
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's create two materials with their respective categories
|
# Let's create two materials with their respective categories
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
|
|||||||
@@ -66,7 +66,9 @@ class Usecase:
|
|||||||
:return: The newly created material set element
|
:return: The newly created material set element
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a wall type that has two layers of
|
# Let's imagine we have a wall type that has two layers of
|
||||||
# gypsum with steel studs inside. Notice we are assigning to
|
# gypsum with steel studs inside. Notice we are assigning to
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcMaterialProfile
|
:return: The newly created IfcMaterialProfile
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a steel I-beam. Notice we are assigning to
|
# 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
|
# the type only, as all occurrences of that type will automatically
|
||||||
|
|||||||
@@ -67,7 +67,9 @@ class Usecase:
|
|||||||
:return: The IfcRelAssociatesMaterial entity
|
:return: The IfcRelAssociatesMaterial entity
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's start with a simple concrete material
|
# Let's start with a simple concrete material
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a steel I-beam. Notice we are assigning to
|
# 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
|
# the type only, as all occurrences of that type will automatically
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
wood = ifcopenshell.api.run("material.add_material", model, name="TIM01", category="wood")
|
wood = ifcopenshell.api.run("material.add_material", model, name="TIM01", category="wood")
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
ifcopenshell.api.run("material.edit_assigned_material", model,
|
ifcopenshell.api.run("material.edit_assigned_material", model,
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's add two materials
|
# Let's add two materials
|
||||||
aluminium1 = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
|
aluminium1 = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's create two materials typically used for steel stud partition
|
# Let's create two materials typically used for steel stud partition
|
||||||
# walls with gypsum lining.
|
# walls with gypsum lining.
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's start with a simple concrete material
|
# Let's start with a simple concrete material
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's create a material set to store our profiles.
|
# Let's create a material set to store our profiles.
|
||||||
material_set = ifcopenshell.api.run("material.add_profile_set", model,
|
material_set = ifcopenshell.api.run("material.add_profile_set", model,
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Let's imagine we have a steel I-beam. Notice we are assigning to
|
# 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
|
# the type only, as all occurrences of that type will automatically
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a material set for windows made out of aluminium and glass.
|
# Create a material set for windows made out of aluminium and glass.
|
||||||
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a material set for steel stud partition walls.
|
# Create a material set for steel stud partition walls.
|
||||||
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a material list for aluminium windows.
|
# Create a material list for aluminium windows.
|
||||||
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a material
|
# Create a material
|
||||||
aluminium = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
|
aluminium = ifcopenshell.api.run("material.add_material", model, name="AL01", category="aluminium")
|
||||||
|
|||||||
@@ -33,7 +33,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Create a material set
|
# Create a material set
|
||||||
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# First, let's create a material set.
|
# First, let's create a material set.
|
||||||
material_set = ifcopenshell.api.run("material.add_profile_set", model,
|
material_set = ifcopenshell.api.run("material.add_profile_set", model,
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
material_set = ifcopenshell.api.run("material.add_material_set", model,
|
||||||
name="Window", set_type="IfcMaterialList")
|
name="Window", set_type="IfcMaterialList")
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ class Usecase:
|
|||||||
:return: None
|
:return: None
|
||||||
:rtype: None
|
:rtype: None
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
concrete = ifcopenshell.api.run("material.add_material", model, name="CON01", category="concrete")
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,9 @@ class Usecase:
|
|||||||
:return: The IfcRelNests relationship instance
|
:return: The IfcRelNests relationship instance
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Faucets are designed to attach onto a sink through a predrilled hole.
|
# Faucets are designed to attach onto a sink through a predrilled hole.
|
||||||
sink = ifcopenshell.api.run("root.create_entity", model,
|
sink = ifcopenshell.api.run("root.create_entity", model,
|
||||||
|
|||||||
@@ -48,7 +48,9 @@ class Usecase:
|
|||||||
:return: The newly created IfcActor or IfcOccupant
|
:return: The newly created IfcActor or IfcOccupant
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
# Setup an organisation with a single role
|
# Setup an organisation with a single role
|
||||||
organisation = ifcopenshell.api.run("owner.add_organisation", model,
|
organisation = ifcopenshell.api.run("owner.add_organisation", model,
|
||||||
|
|||||||
@@ -40,7 +40,9 @@ class Usecase:
|
|||||||
:return: The new IfcPostalAddress or IfcTelecomAddress
|
:return: The new IfcPostalAddress or IfcTelecomAddress
|
||||||
:rtype: ifcopenshell.entity_instance.entity_instance
|
:rtype: ifcopenshell.entity_instance.entity_instance
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
organisation = ifcopenshell.api.run("owner.add_organisation", model)
|
organisation = ifcopenshell.api.run("owner.add_organisation", model)
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ class Usecase:
|
|||||||
application intended for computers to read.
|
application intended for computers to read.
|
||||||
:type application_identifier: str, optional
|
:type application_identifier: str, optional
|
||||||
|
|
||||||
Example::
|
Example:
|
||||||
|
|
||||||
|
.. code:: python
|
||||||
|
|
||||||
application = ifcopenshell.api.run("owner.add_application", model)
|
application = ifcopenshell.api.run("owner.add_application", model)
|
||||||
"""
|
"""
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user