Configuration¶
ifc-graph can be configured through environment variables, configuration files, and CLI arguments.
Environment Variables¶
Create a .env file in your project root:
# Neo4j Connection
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=your_password_here
# Default IFC file path
IFC_FILE_PATH=./model.ifc
Available Environment Variables¶
| Variable | Description | Default |
|---|---|---|
NEO4J_URI |
Neo4j connection URI | bolt://localhost:7687 |
NEO4J_USER |
Neo4j username | neo4j |
NEO4J_PASSWORD |
Neo4j password | (required) |
IFC_FILE_PATH |
Default IFC file path | (none) |
Configuration File¶
Create a config.yaml file to customize extraction settings:
# Element types to extract from IFC files
element_types:
- IfcWall
- IfcWallStandardCase
- IfcDoor
- IfcWindow
- IfcColumn
- IfcBeam
- IfcSlab
- IfcStair
- IfcRamp
- IfcRoof
- IfcCurtainWall
- IfcPlate
- IfcMember
- IfcRailing
- IfcFurniture
- IfcBuildingElementProxy
# Extraction options
extraction:
include_property_sets: true
include_materials: true
max_properties_per_element: 50
Supported Element Types¶
ifc-graph can extract any IFC element type. Common types include:
Structural Elements¶
IfcWall,IfcWallStandardCaseIfcColumnIfcBeamIfcSlabIfcFootingIfcPile
Architectural Elements¶
IfcDoorIfcWindowIfcStair,IfcStairFlightIfcRamp,IfcRampFlightIfcRoofIfcCurtainWallIfcRailing
MEP Elements¶
IfcFlowTerminalIfcFlowSegmentIfcFlowFittingIfcDistributionElement
Furniture & Equipment¶
IfcFurnitureIfcFurnishingElementIfcBuildingElementProxy
Extraction Options¶
| Option | Type | Description |
|---|---|---|
include_property_sets |
boolean | Extract property sets for each element |
include_materials |
boolean | Extract material information |
max_properties_per_element |
integer | Limit properties per element (performance) |
CLI Arguments¶
CLI arguments override environment variables and config file settings:
ifc-graph \
--ifc-file model.ifc \
--config custom_config.yaml \
--neo4j-uri bolt://production:7687 \
--neo4j-user admin \
--neo4j-password secret \
--clear-db \
--log-level DEBUG
Configuration Priority¶
Settings are applied in this order (later overrides earlier):
- Default values - Built-in defaults
- Environment variables - From
.envfile - Configuration file - From
config.yaml - CLI arguments - Command-line options
Example Configurations¶
Minimal Configuration (Structural Only)¶
Full Building Model¶
element_types:
# Structural
- IfcWall
- IfcWallStandardCase
- IfcColumn
- IfcBeam
- IfcSlab
- IfcFooting
- IfcPile
# Architectural
- IfcDoor
- IfcWindow
- IfcStair
- IfcStairFlight
- IfcRamp
- IfcRoof
- IfcCurtainWall
- IfcRailing
# Openings
- IfcOpeningElement
# Other
- IfcBuildingElementProxy
extraction:
include_property_sets: true
include_materials: true
max_properties_per_element: 100
MEP Focus¶
element_types:
- IfcFlowTerminal
- IfcFlowSegment
- IfcFlowFitting
- IfcFlowController
- IfcDistributionElement
- IfcDistributionFlowElement
- IfcPipeSegment
- IfcPipeFitting
- IfcDuctSegment
- IfcDuctFitting
- IfcCableSegment
Validating Configuration¶
Use dry-run mode to validate your configuration without making database changes:
This will show which elements would be extracted with your current settings.