mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Make syntax highlighting explicit in docs
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
"""
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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 ... ]
|
||||
|
||||
Reference in New Issue
Block a user