ifc-to-excel
Convert IFC files (2x3, 4x1, 4x3) to Excel databases using IfcExporter CLI. Extract BIM data, properties, and geometry without proprietary software.
What this skill does
# IFC to Excel Conversion
## Business Case
### Problem Statement
IFC (Industry Foundation Classes) is the open BIM standard, but:
- Reading IFC requires specialized software
- Property extraction needs programming knowledge
- Batch processing is manual and time-consuming
- Integration with analytics tools is complex
### Solution
IfcExporter.exe converts IFC files to structured Excel databases, making BIM data accessible for analysis, validation, and reporting.
### Business Value
- **Open standard** - Process any IFC file (2x3, 4x, 4.3)
- **No licenses** - Works offline without BIM software
- **Data extraction** - All properties, quantities, materials
- **3D geometry** - Export to Collada DAE format
- **Pipeline ready** - Integrate with ETL workflows
## Technical Implementation
### CLI Syntax
```bash
IfcExporter.exe <input_ifc> [options]
```
### Supported IFC Versions
| Version | Schema | Description |
|---------|--------|-------------|
| IFC2x3 | MVD | Most common exchange format |
| IFC4 | ADD1 | Enhanced properties |
| IFC4x1 | Alignment | Infrastructure support |
| IFC4x3 | Latest | Full infrastructure |
### Output Formats
| Output | Description |
|--------|-------------|
| `.xlsx` | Excel database with elements and properties |
| `.dae` | Collada 3D geometry with matching IDs |
### Options
| Option | Description |
|--------|-------------|
| `bbox` | Include element bounding boxes |
| `-no-xlsx` | Skip Excel export |
| `-no-collada` | Skip 3D geometry export |
### Examples
```bash
# Basic conversion (XLSX + DAE)
IfcExporter.exe "C:\Models\Building.ifc"
# With bounding boxes
IfcExporter.exe "C:\Models\Building.ifc" bbox
# Excel only (no 3D geometry)
IfcExporter.exe "C:\Models\Building.ifc" -no-collada
# Batch processing
for /R "C:\IFC_Models" %f in (*.ifc) do IfcExporter.exe "%f" bbox
```
### Python Integration
```python
import subprocess
import pandas as pd
from pathlib import Path
from typing import List, Optional, Dict, Any, Set
from dataclasses import dataclass, field
from enum import Enum
import json
class IFCVersion(Enum):
"""IFC schema versions."""
IFC2X3 = "IFC2X3"
IFC4 = "IFC4"
IFC4X1 = "IFC4X1"
IFC4X3 = "IFC4X3"
class IFCEntityType(Enum):
"""Common IFC entity types."""
IFCWALL = "IfcWall"
IFCWALLSTANDARDCASE = "IfcWallStandardCase"
IFCSLAB = "IfcSlab"
IFCCOLUMN = "IfcColumn"
IFCBEAM = "IfcBeam"
IFCDOOR = "IfcDoor"
IFCWINDOW = "IfcWindow"
IFCROOF = "IfcRoof"
IFCSTAIR = "IfcStair"
IFCRAILING = "IfcRailing"
IFCFURNISHINGELEMENT = "IfcFurnishingElement"
IFCSPACE = "IfcSpace"
IFCBUILDINGSTOREY = "IfcBuildingStorey"
IFCBUILDING = "IfcBuilding"
IFCSITE = "IfcSite"
@dataclass
class IFCElement:
"""Represents an IFC element."""
global_id: str
ifc_type: str
name: str
description: Optional[str]
object_type: Optional[str]
level: Optional[str]
# Quantities
area: Optional[float] = None
volume: Optional[float] = None
length: Optional[float] = None
height: Optional[float] = None
width: Optional[float] = None
# Bounding box (if exported)
bbox_min_x: Optional[float] = None
bbox_min_y: Optional[float] = None
bbox_min_z: Optional[float] = None
bbox_max_x: Optional[float] = None
bbox_max_y: Optional[float] = None
bbox_max_z: Optional[float] = None
# Properties
properties: Dict[str, Any] = field(default_factory=dict)
materials: List[str] = field(default_factory=list)
@dataclass
class IFCProperty:
"""Represents an IFC property."""
pset_name: str
property_name: str
value: Any
value_type: str
@dataclass
class IFCMaterial:
"""Represents an IFC material."""
name: str
category: Optional[str]
thickness: Optional[float]
layer_position: Optional[int]
class IFCExporter:
"""IFC to Excel converter using DDC IfcExporter CLI."""
def __init__(self, exporter_path: str = "IfcExporter.exe"):
self.exporter = Path(exporter_path)
if not self.exporter.exists():
raise FileNotFoundError(f"IfcExporter not found: {exporter_path}")
def convert(self, ifc_file: str,
include_bbox: bool = True,
export_xlsx: bool = True,
export_collada: bool = True) -> Path:
"""Convert IFC file to Excel."""
ifc_path = Path(ifc_file)
if not ifc_path.exists():
raise FileNotFoundError(f"IFC file not found: {ifc_file}")
cmd = [str(self.exporter), str(ifc_path)]
if include_bbox:
cmd.append("bbox")
if not export_xlsx:
cmd.append("-no-xlsx")
if not export_collada:
cmd.append("-no-collada")
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"Export failed: {result.stderr}")
return ifc_path.with_suffix('.xlsx')
def batch_convert(self, folder: str,
include_subfolders: bool = True,
include_bbox: bool = True) -> List[Dict[str, Any]]:
"""Convert all IFC files in folder."""
folder_path = Path(folder)
pattern = "**/*.ifc" if include_subfolders else "*.ifc"
results = []
for ifc_file in folder_path.glob(pattern):
try:
output = self.convert(str(ifc_file), include_bbox)
results.append({
'input': str(ifc_file),
'output': str(output),
'status': 'success'
})
print(f"✓ Converted: {ifc_file.name}")
except Exception as e:
results.append({
'input': str(ifc_file),
'output': None,
'status': 'failed',
'error': str(e)
})
print(f"✗ Failed: {ifc_file.name} - {e}")
return results
def read_elements(self, xlsx_file: str) -> pd.DataFrame:
"""Read converted Excel as DataFrame."""
return pd.read_excel(xlsx_file, sheet_name="Elements")
def get_element_types(self, xlsx_file: str) -> pd.DataFrame:
"""Get element type summary."""
df = self.read_elements(xlsx_file)
if 'IfcType' not in df.columns:
raise ValueError("IfcType column not found")
summary = df.groupby('IfcType').agg({
'GlobalId': 'count',
'Volume': 'sum' if 'Volume' in df.columns else 'count',
'Area': 'sum' if 'Area' in df.columns else 'count'
}).reset_index()
summary.columns = ['IFC_Type', 'Count', 'Total_Volume', 'Total_Area']
return summary.sort_values('Count', ascending=False)
def get_levels(self, xlsx_file: str) -> pd.DataFrame:
"""Get building level summary."""
df = self.read_elements(xlsx_file)
level_col = None
for col in ['Level', 'BuildingStorey', 'IfcBuildingStorey']:
if col in df.columns:
level_col = col
break
if level_col is None:
return pd.DataFrame(columns=['Level', 'Element_Count'])
summary = df.groupby(level_col).agg({
'GlobalId': 'count'
}).reset_index()
summary.columns = ['Level', 'Element_Count']
return summary
def get_materials(self, xlsx_file: str) -> pd.DataFrame:
"""Get material summary."""
df = self.read_elements(xlsx_file)
if 'Material' not in df.columns:
return pd.DataFrame(columns=['Material', 'Count'])
summary = df.groupby('Material').agg({
'GlobalId': 'count'
}).reset_index()
summary.columns = ['Material', 'Element_Count']
return summary.sort_values('Element_Count', ascending=False)
def get_quantities(self, xlsx_file: str,
group_by: str = 'IfcType') -> pd.DataFrame:
"Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.