Minor fixes to IfcCSV documentation

This commit is contained in:
Dion Moult
2024-03-03 15:25:15 +11:00
parent 5e4afbc748
commit 25b73fc35a
+17 -15
View File
@@ -1,8 +1,9 @@
IfcCSV IfcCSV
====== ======
IfcCSV lets you view and edit IFC data using spreadsheets or tabular datasets, IfcCSV lets you view and edit IFC data using spreadsheets or tabular datasets.
such as CSV, ODS, XLSX, Pandas DataFrames, and regular Python lists. IfcCSV supports CSV (Comma Separated Values), ODS (Open Document Spreadsheet),
XLSX (Microsoft Excel), Pandas DataFrames, and regular Python lists.
IfcCSV lets you select rooted elements using the IFC selection queries. These IfcCSV lets you select rooted elements using the IFC selection queries. These
elements may be physical elements (walls, doors, windows, etc), construction elements may be physical elements (walls, doors, windows, etc), construction
@@ -13,13 +14,13 @@ Once you have selected a list of elements, you may specify attributes,
properties, quantities, or relationships to extract and use as columns in your properties, quantities, or relationships to extract and use as columns in your
table. table.
For example, you might use a selection query of ``.IfcDoor``, for all doors in For example, you might use a selection query of ``IfcDoor``, for all doors in
your project. You may then specify a ``class`` attribute, a ``Name`` attribute, your project. You may then specify a ``class`` attribute, a ``Name`` attribute,
a ``type.Name`` relationship, and a ``type.Description`` relationship. This a ``type.Name`` relationship, and a ``type.Description`` relationship. You can
will produce a table as shown: then produce a spreadsheet like this:
+------------------------+---------+------+-----------+------------------------------------+ +------------------------+---------+------+-----------+------------------------------------+
| GlobalId | class | Name | type.Name | type.Description | | GlobalId | Class | Name | Type Name | Type Description |
+========================+=========+======+===========+====================================+ +========================+=========+======+===========+====================================+
| 3AjGVS9EjBeBrDA5_tAcwQ | IfcDoor | 01 | DT-A | Single swing steel frame door | | 3AjGVS9EjBeBrDA5_tAcwQ | IfcDoor | 01 | DT-A | Single swing steel frame door |
+------------------------+---------+------+-----------+------------------------------------+ +------------------------+---------+------+-----------+------------------------------------+
@@ -32,8 +33,8 @@ will produce a table as shown:
.. note:: .. note::
IfcCSV automatically inserts the GlobalId column at the beginning, in order By default, IfcCSV automatically inserts the GlobalId column at the
to uniquely identify the element. beginning, in order to uniquely identify the element.
This tabular data may then be exported in your desired format. This tabular data may then be exported in your desired format.
@@ -42,8 +43,8 @@ you make in the spreadsheet or table will also be made in the IFC.
There are different methods of installation, depending on your situation. There are different methods of installation, depending on your situation.
1. **Source installation** is recommended for users wanting to use the latest 1. **Source installation** is recommended for developers wanting to use the
code as a library or a CLI utility. latest code as a library or a CLI utility.
2. **Using the BlenderBIM Add-on** is recommended for non-developers wanting a 2. **Using the BlenderBIM Add-on** is recommended for non-developers wanting a
graphical interface. graphical interface.
@@ -54,11 +55,12 @@ Source installation
2. `Clone the source code <https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/ifccsv>`_. 2. `Clone the source code <https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.7.0/src/ifccsv>`_.
3. ``cd /path/to/IfcOpenShell/src/ifccsv`` 3. ``cd /path/to/IfcOpenShell/src/ifccsv``
Depending on which formats you want to edit, you will need to install more dependencies: Depending on which formats you want to edit, you will need to install more
dependencies:
- ``pip install odfpy`` for ODS support - ``pip install odfpy`` for ODS support
- ``pip install xlsxwriter`` for XLSX support - ``pip install openpyxl`` for XLSX support
- ``pip install pandas`` for Pandas DataFrame support - ``pip install pandas`` for ODS, XLSX, and Pandas DataFrame support
Here is a minimal example of how to use IfcDiff as a Python module or CLI Here is a minimal example of how to use IfcDiff as a Python module or CLI
utility: utility:
@@ -100,7 +102,7 @@ utility:
Choose the sort order from ASC or DESC for each sorted attribute. Choose the sort order from ASC or DESC for each sorted attribute.
--export Export from IFC to the desired format. --export Export from IFC to the desired format.
--import Import from the autodetected format to IFC. --import Import from the autodetected format to IFC.
$ python -m ifccsv -i model.ifc -s out.csv -f csv -q .IfcProduct -a "Name" "Description" --export $ python -m ifccsv -i model.ifc -s out.csv -f csv -q IfcProduct -a "Name" "Description" --export
$ cat out.csv $ cat out.csv
Here is a minimal example of how to use IfcCSV as a library: Here is a minimal example of how to use IfcCSV as a library:
@@ -159,7 +161,7 @@ interface to access the IfcOpenShell utilities.
3. Browse to your IFC file. 3. Browse to your IFC file.
4. Type in a filter query, such as ``.IfcDoor``. 4. Type in a filter query, such as ``IfcDoor``.
5. Optionally add attributes you'd like to export. 5. Optionally add attributes you'd like to export.