mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
ifc5d - continue refactor
This commit is contained in:
+37
-11
@@ -23,6 +23,14 @@ Planned (would you like to contribute? Please reach out!):
|
||||
|
||||
## Usage CSV to IFC
|
||||
|
||||
Simple example:
|
||||
```python
|
||||
import ifc5d.csv2ifc
|
||||
|
||||
csv2ifc = ifc5d.csv2ifc.Csv2Ifc(csv_filepath, ifc_file)
|
||||
csv2ifc.execute()
|
||||
```
|
||||
|
||||
See example files as a CSV file format reference:
|
||||
- `sample_cost_schedule_house_FR.csv` / `.ods`
|
||||
- `schedule.csv`, `rates.csv` (schedule of rates example)
|
||||
@@ -31,21 +39,39 @@ Some notes on the format:
|
||||
- Empty lines are ignored.
|
||||
- Importing ods/xlsx is not currently supported, only csv.
|
||||
- 'Property', 'Query' columns are required only for non-schedule of rates cost schedules.
|
||||
- Some older exports may have 'Description' field instead of 'Name', it is safe to just rename it.
|
||||
- 'Index' was preferred for import hierarchy source over 'Hierarchy' as it's easier to edit from the table view.
|
||||
- In non-SoR if cost values are not provided in any way and cost item has subitems, then `SUM()` will added automatically as it's cost value.
|
||||
Mixing `SUM()` cost items and items with their own value is not supported.
|
||||
|
||||
## Columns Description
|
||||
|
||||
**General Columns**
|
||||
- 'Index' - is a hierarchy depth that's used for building hierarchy during csv import. Starts from 1.
|
||||
E.g. root items of the same level have index '1', their children have '2', etc.
|
||||
- 'Name' - IfcCostItem.Name.
|
||||
Some older exports may have 'Description' field instead of 'Name', it is safe to just rename it.
|
||||
- 'Identification' - IfcCostItem.Identification.
|
||||
- 'Unit' - IfcCostValue unit, should be provided as a unit symbol.
|
||||
E.g. 'm2', 'm3', 'kg', etc.
|
||||
- 'Value' - overall cost value to assign to IfcCostItem.
|
||||
- All other columns that are not mentioned in this list or the one below will be interpeted as cost value categories.
|
||||
Note that if 'Value' is provided, it takes priority over subcategories.
|
||||
|
||||
Non-schedule of rates columns:
|
||||
- 'Quantity' - total cost item quantity.
|
||||
- 'Property' - quantity name that should be added to IfcCostItem from 'Query' elements.
|
||||
If 'Query' is provided, 'Property' can be left empty or set to "COUNT" to count queried elements.
|
||||
- 'Query' - selector query for elements to assign to IfcCostItem.
|
||||
If query is provided, it takes priority over 'Quantity' (using both is not supported).
|
||||
|
||||
**Exported informational columns (not used for import)**
|
||||
- 'Hierarchy' is just an informational column that doesn't affect the import.
|
||||
E.g. '1', '1.1', '1.1.1', etc.
|
||||
- 'Index' column is a hierarchy depth that's used for building hierarchy during csv import, starting from 1.
|
||||
E.g. root items of the same level have index '1', their children have '2', etc.
|
||||
- 'Index' was preferred for import hierarchy source over 'Hierarchy' as it's easier to edit from the table view.
|
||||
- 'Id' - IfcCostItem.id
|
||||
- 'RateSubtotal' - all IfcCostItem specific costs, not including subitem costs.
|
||||
- 'TotalPrice' - IfcCostItem total cost, including subitem sum calculations.
|
||||
|
||||
|
||||
Simple example:
|
||||
```python
|
||||
import ifc5d.csv2ifc
|
||||
|
||||
csv2ifc = ifc5d.csv2ifc.Csv2Ifc(csv_filepath, ifc_file)
|
||||
csv2ifc.execute()
|
||||
```
|
||||
|
||||
|
||||
## Usage IFC to CSV, ODS, XSLS
|
||||
|
||||
Reference in New Issue
Block a user