rvt-to-ifc
Convert RVT files to IFC format. Support IFC2x3, IFC4, IFC4.3 with customizable export settings.
What this skill does
# RVT to IFC Conversion
> **Note:** RVT is the file format. IFC is an open standard by buildingSMART International.
## Business Case
### Problem Statement
IFC is the open BIM standard for interoperability, but:
- Native Revit IFC export requires Autodesk license
- Export settings significantly affect data quality
- Batch processing is manual and time-consuming
### Solution
RVT2IFCconverter.exe converts Revit files to IFC offline, without licenses, with full control over export settings.
### Business Value
- **No license required** - Works without Autodesk software
- **Multiple IFC versions** - IFC2x3, IFC4, IFC4.3 support
- **Batch processing** - Convert thousands of files
- **Consistent quality** - Standardized export settings
## Technical Implementation
### CLI Syntax
```bash
RVT2IFCconverter.exe <input.rvt> [<output.ifc>] [preset=<name>] [config="..."]
```
### IFC Versions
| Version | Use Case |
|---------|----------|
| IFC2x3 | Legacy compatibility, most software |
| IFC4 | Enhanced properties, modern BIM |
| IFC4.3 | Infrastructure, latest standard |
### Export Presets
| Preset | Description |
|--------|-------------|
| `standard` | Default balanced export |
| `extended` | Maximum detail and properties |
| `custom` | User-defined configuration |
### Examples
```bash
# Standard IFC export
RVT2IFCconverter.exe "C:\Projects\Building.rvt"
# IFC4 with extended settings
RVT2IFCconverter.exe "C:\Projects\Building.rvt" preset=extended
# Custom output path
RVT2IFCconverter.exe "C:\Projects\Building.rvt" "D:\Export\model.ifc"
# Custom configuration
RVT2IFCconverter.exe "C:\Projects\Building.rvt" config="ExportBaseQuantities=true; SitePlacement=Shared"
```
### Python Integration
```python
import subprocess
from pathlib import Path
from typing import List, Optional, Dict, Any
from dataclasses import dataclass
from enum import Enum
class IFCVersion(Enum):
"""IFC schema versions."""
IFC2X3 = "IFC2x3"
IFC4 = "IFC4"
IFC4X3 = "IFC4x3"
class ExportPreset(Enum):
"""Export presets."""
STANDARD = "standard"
EXTENDED = "extended"
CUSTOM = "custom"
@dataclass
class IFCExportConfig:
"""IFC export configuration."""
ifc_version: IFCVersion = IFCVersion.IFC4
export_base_quantities: bool = True
site_placement: str = "Shared"
split_walls_and_columns: bool = False
include_steel_elements: bool = True
export_2d_elements: bool = False
export_linked_files: bool = False
export_rooms: bool = True
export_schedules: bool = True
def to_config_string(self) -> str:
"""Convert to CLI config string."""
parts = [
f"ExportBaseQuantities={str(self.export_base_quantities).lower()}",
f"SitePlacement={self.site_placement}",
f"SplitWallsAndColumns={str(self.split_walls_and_columns).lower()}",
f"IncludeSteelElements={str(self.include_steel_elements).lower()}",
f"Export2DElements={str(self.export_2d_elements).lower()}",
f"ExportLinkedFiles={str(self.export_linked_files).lower()}",
f"ExportRooms={str(self.export_rooms).lower()}"
]
return "; ".join(parts)
class RevitToIFCConverter:
"""Convert Revit files to IFC format."""
def __init__(self, converter_path: str = "RVT2IFCconverter.exe"):
self.converter = Path(converter_path)
if not self.converter.exists():
raise FileNotFoundError(f"Converter not found: {converter_path}")
def convert(self, rvt_file: str,
output_path: Optional[str] = None,
preset: ExportPreset = ExportPreset.STANDARD,
config: Optional[IFCExportConfig] = None) -> Path:
"""Convert Revit file to IFC."""
rvt_path = Path(rvt_file)
if not rvt_path.exists():
raise FileNotFoundError(f"Revit file not found: {rvt_file}")
# Build command
cmd = [str(self.converter), str(rvt_path)]
# Add output path if specified
if output_path:
cmd.append(output_path)
# Add preset
cmd.append(f"preset={preset.value}")
# Add custom config if provided
if config:
cmd.append(f'config="{config.to_config_string()}"')
# Execute
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode != 0:
raise RuntimeError(f"Conversion failed: {result.stderr}")
# Return output path
if output_path:
return Path(output_path)
return rvt_path.with_suffix('.ifc')
def batch_convert(self, folder: str,
output_folder: Optional[str] = None,
preset: ExportPreset = ExportPreset.STANDARD,
config: Optional[IFCExportConfig] = None) -> List[Dict[str, Any]]:
"""Convert all Revit files in folder."""
folder_path = Path(folder)
results = []
for rvt_file in folder_path.glob("**/*.rvt"):
try:
# Determine output path
if output_folder:
out_dir = Path(output_folder)
out_dir.mkdir(parents=True, exist_ok=True)
output_path = str(out_dir / rvt_file.with_suffix('.ifc').name)
else:
output_path = None
ifc_path = self.convert(str(rvt_file), output_path, preset, config)
results.append({
'input': str(rvt_file),
'output': str(ifc_path),
'status': 'success'
})
print(f"✓ Converted: {rvt_file.name}")
except Exception as e:
results.append({
'input': str(rvt_file),
'output': None,
'status': 'failed',
'error': str(e)
})
print(f"✗ Failed: {rvt_file.name} - {e}")
return results
def validate_output(self, ifc_file: str) -> Dict[str, Any]:
"""Basic validation of generated IFC."""
ifc_path = Path(ifc_file)
if not ifc_path.exists():
return {'valid': False, 'error': 'File not found'}
# Basic file checks
file_size = ifc_path.stat().st_size
if file_size < 1000:
return {'valid': False, 'error': 'File too small'}
# Read header
with open(ifc_file, 'r', errors='ignore') as f:
header = f.read(1000)
# Check IFC format
if 'ISO-10303-21' not in header:
return {'valid': False, 'error': 'Not a valid IFC file'}
# Detect version
version = 'Unknown'
if 'IFC4X3' in header:
version = 'IFC4.3'
elif 'IFC4' in header:
version = 'IFC4'
elif 'IFC2X3' in header:
version = 'IFC2x3'
return {
'valid': True,
'file_size': file_size,
'ifc_version': version
}
class IFCQualityChecker:
"""Check quality of IFC exports."""
def __init__(self, converter: RevitToIFCConverter):
self.converter = converter
def compare_presets(self, rvt_file: str) -> Dict[str, Any]:
"""Compare different export presets."""
results = {}
for preset in [ExportPreset.STANDARD, ExportPreset.EXTENDED]:
try:
output = Path(rvt_file).with_suffix(f'.{preset.value}.ifc')
self.converter.convert(rvt_file, str(output), preset)
validation = self.converter.validate_output(str(output))
results[preset.value] = {
'file_size': validation.get('file_size', 0),
'valid': validation.get('valid', False)
}
except Exception as e:
results[preset.value] = {'error': str(e)}
return results
# Convenience functions
def convert_revit_to_ifc(rvt_file: str,
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.