2021-08-09 16:56:30 +10:00
|
|
|
# ifc5d
|
|
|
|
|
|
2023-02-15 22:50:39 +01:00
|
|
|
## Description
|
|
|
|
|
|
2021-08-09 16:56:30 +10:00
|
|
|
Ifc5D is a collection of utilities of manipulating cost-related data to and from
|
|
|
|
|
formats, reports, and optimisation engines.
|
|
|
|
|
|
|
|
|
|
Currently supported:
|
|
|
|
|
|
|
|
|
|
- CSV to IFC
|
2023-02-15 22:50:39 +01:00
|
|
|
- IFC to XLSX
|
|
|
|
|
- IFC to CSV
|
|
|
|
|
- IFC to ODS
|
|
|
|
|
|
2021-08-09 16:56:30 +10:00
|
|
|
|
|
|
|
|
Planned (would you like to contribute? Please reach out!):
|
|
|
|
|
|
2023-02-15 22:50:39 +01:00
|
|
|
|
2021-08-09 16:56:30 +10:00
|
|
|
- IFC to PDF
|
|
|
|
|
- ODS to CSV
|
|
|
|
|
- XLSX to CSV
|
|
|
|
|
- IFC to Graph
|
2023-02-15 22:50:39 +01:00
|
|
|
|
|
|
|
|
## Usage CSV to IFC
|
|
|
|
|
|
|
|
|
|
## Usage IFC to CSV, ODS, XSLS
|
|
|
|
|
|
2023-02-16 20:15:54 +01:00
|
|
|
#TODO
|
|
|
|
|
|
2023-02-15 22:50:39 +01:00
|
|
|
### CLI app for converting IFC files to CSV, ODS or XLSX format.
|
|
|
|
|
|
|
|
|
|
Usage:
|
|
|
|
|
python ifc5Dspreadsheet.py input_file output_file [-l log_file] [-f format_type]
|
|
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
|
input_file (str): The path to the input IFC file to process.
|
|
|
|
|
output_file (str): The output directory for CSV or filename for other formats.
|
|
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
-l, --log log_file (str): The path to the file where errors should be logged. Default is process.log.
|
|
|
|
|
-f, --format format_type (str): The output format to export in (csv/ods/xlsx). Default is csv.
|
|
|
|
|
|
|
|
|
|
Examples:
|
2023-02-16 20:15:54 +01:00
|
|
|
python ifc5Dspreadsheet.py "C:\Users\Dev-Machine\Desktop\test_cost.ifc" rev_01_schedule -l error.log -f ODS
|
|
|
|
|
python ifc5Dspreadsheet.py "C:\Users\Username\Desktop\test_cost.ifc" "C:\Users\Username\Desktop" -l error.log -f CSV
|
|
|
|
|
|
2023-02-15 22:50:39 +01:00
|
|
|
### Scripting:
|
|
|
|
|
|
|
|
|
|
Example for ODS exports:
|
2023-02-16 20:15:54 +01:00
|
|
|
|
|
|
|
|
```
|
2023-02-15 22:50:39 +01:00
|
|
|
import ifcopenshell
|
|
|
|
|
from ifc5d.ifc5Dspreadsheet import Ifc5DOdsWriter
|
|
|
|
|
|
|
|
|
|
file = "path_to_file/file.ifc"
|
|
|
|
|
|
|
|
|
|
path = "directory/cost_schedule"
|
|
|
|
|
writer = Ifc5DOdsWriter(file=file, output=path)
|
|
|
|
|
writer.write()
|
|
|
|
|
|
2023-02-16 20:15:54 +01:00
|
|
|
```
|