datadrivenconstruction

Rvt To Excel

開發程式設計v2.0.0
作者:datadrivenconstruction更新於 2026-05-11共 2 個版本 · 最新版本釋出於 2026-02-13rvt-to-excel@clawhub_datadrivenconstruction/rvt-to-excel
指令碼工具

據 AlphaMoat 統計,截至 2026-09,Rvt To Excel 累計下載 2,086 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 4,368 位,在「開發程式設計」分類(577 個)中排名第 526 位。

累計安裝
143
累計下載
2086
星標
1
全站排名
#4,368
全站前 87% · 「開發程式設計」前 92%
平台累計安裝累計下載星標評論
ClawHub ↗6019361-
SkillHub ↗14320861—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

該指南介紹從 RVT/RFA 檔案提取構件資訊、屬性和工程量,供報告與後續分析使用。轉換會讀取專案檔案並寫入工作簿;第三方匯出程式沒有內建版本驗證。使用前應審閱並核驗可執行檔案,只授予必要的輸入與輸出目錄許可權,並檢查生成結果。

資料釋出於 2026-10-29

可以用來做什麼

  • 規劃 BIM 構件屬性和工程量提取
  • 整理待審閱的批次轉換流程
  • 檢查供報告使用的輸出工作簿

什麼時候用

  • 需要將獲授權的 RVT 或 RFA 檔案轉換為 Excel 資料時
  • 已審查匯出程式及輸入輸出目錄許可權時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

僅總結文件中的轉換流程和風險,不要執行命令或傳送資料。

月度資料趨勢

累計下載2086
1126164221572026-03 · 累計下載 11972026-05 · 累計下載 14932026-06 · 累計下載 16052026-07 · 累計下載 17752026-08 · 累計下載 18712026-09 · 累計下載 208626-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092086—1
2026-081871+5.4%1
2026-071775+10.6%1
2026-061605+7.5%1
2026-051493—1
2026-031197—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

6.6 KB · ClawHub v2.0.0
---
name: "rvt-to-excel"
description: "Convert RVT/RFA files to Excel databases. Extract BIM element data, properties, and quantities."
---

# RVT to Excel Conversion

## Business Case

### Problem Statement
展開全部(共 217 行)
BIM data inside RVT files needs to be extracted for:
- Processing multiple projects in batch
- Integrating BIM data with analytics pipelines
- Sharing structured data with stakeholders
- Generating reports and quantity takeoffs

### Solution
Convert RVT files to structured Excel databases for analysis and reporting.

### Business Value
- **Batch processing** - Convert multiple projects
- **Data accessibility** - Excel format for universal access
- **Pipeline integration** - Feed data to BI tools, ML models
- **Structured output** - Organized element data and properties

## Technical Implementation

### CLI Syntax
```bash
RvtExporter.exe <input_path> [export_mode] [options]
```

### Export Modes
| Mode | Categories | Description |
|------|-----------|-------------|
| `basic` | 309 | Essential structural elements |
| `standard` | 724 | Standard BIM categories |
| `complete` | 1209 | All Revit categories |
| `custom` | User-defined | Specific categories only |

### Options
| Option | Description |
|--------|-------------|
| `bbox` | Include bounding box coordinates |
| `rooms` | Include room associations |
| `schedules` | Export all schedules to sheets |
| `sheets` | Export sheets to PDF |

### Examples

```bash
# Basic export
RvtExporter.exe "C:\Projects\Building.rvt" basic

# Complete with bounding boxes
RvtExporter.exe "C:\Projects\Building.rvt" complete bbox

# Full export with all options
RvtExporter.exe "C:\Projects\Building.rvt" complete bbox rooms schedules sheets

# Batch processing
for /R "C:\Projects" %f in (*.rvt) do RvtExporter.exe "%f" standard bbox
```

### Python Integration

```python
import subprocess
import pandas as pd
from pathlib import Path
from typing import List, Optional

class RevitExporter:
    def __init__(self, exporter_path: str = "RvtExporter.exe"):
        self.exporter = Path(exporter_path)
        if not self.exporter.exists():
            raise FileNotFoundError(f"RvtExporter not found: {exporter_path}")

    def convert(self, rvt_file: str, mode: str = "complete",
                options: List[str] = None) -> Path:
        """Convert Revit file to Excel."""
        rvt_path = Path(rvt_file)
        if not rvt_path.exists():
            raise FileNotFoundError(f"Revit file not found: {rvt_file}")

        cmd = [str(self.exporter), str(rvt_path), mode]
        if options:
            cmd.extend(options)

        result = subprocess.run(cmd, capture_output=True, text=True)

        if result.returncode != 0:
            raise RuntimeError(f"Export failed: {result.stderr}")

        # Output file is same name with .xlsx extension
        output_file = rvt_path.with_suffix('.xlsx')
        return output_file

    def batch_convert(self, folder: str, mode: str = "standard",
                      pattern: str = "*.rvt") -> List[Path]:
        """Convert all Revit files in folder."""
        folder_path = Path(folder)
        converted = []

        for rvt_file in folder_path.glob(pattern):
            try:
                output = self.convert(str(rvt_file), mode)
                converted.append(output)
                print(f"Converted: {rvt_file.name}")
            except Exception as e:
                print(f"Failed: {rvt_file.name} - {e}")

        return converted

    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_quantities(self, xlsx_file: str,
                       group_by: str = "Category") -> pd.DataFrame:
        """Get quantity summary grouped by category."""
        df = self.read_elements(xlsx_file)

        # Group and count
        summary = df.groupby(group_by).agg({
            'ElementId': 'count',
            'Area': 'sum',
            'Volume': 'sum'
        }).reset_index()

        summary.columns = [group_by, 'Count', 'Total_Area', 'Total_Volume']
        return summary
```

## Output Structure

### Excel Sheets
| Sheet | Content |
|-------|---------|
| Elements | All BIM elements with properties |
| Categories | Element categories summary |
| Levels | Building levels |
| Materials | Material definitions |
| Parameters | Shared parameters |

### Element Columns
| Column | Type | Description |
|--------|------|-------------|
| ElementId | int | Unique Revit ID |
| Category | string | Element category |
| Family | string | Family name |
| Type | string | Type name |
| Level | string | Associated level |
| Area | float | Surface area (m²) |
| Volume | float | Volume (m³) |
| BBox_MinX/Y/Z | float | Bounding box min |
| BBox_MaxX/Y/Z | float | Bounding box max |

## Usage Example

```python
# Initialize exporter
exporter = RevitExporter("C:/Tools/RvtExporter.exe")

# Convert single file
xlsx = exporter.convert("C:/Projects/Office.rvt", "complete", ["bbox", "rooms"])

# Read and analyze
df = exporter.read_elements(str(xlsx))
print(f"Total elements: {len(df)}")

# Quantity summary
quantities = exporter.get_quantities(str(xlsx))
print(quantities)

# Export to CSV for further processing
df.to_csv("elements.csv", index=False)
```

## Integration with DDC Pipeline

```python
# Full pipeline: Revit → Excel → Cost Estimate
from semantic_search import CWICRSemanticSearch

# 1. Convert Revit
exporter = RevitExporter()
xlsx = exporter.convert("project.rvt", "complete", ["bbox"])

# 2. Extract quantities
df = exporter.read_elements(str(xlsx))
quantities = df.groupby('Category')['Volume'].sum().to_dict()

# 3. Search CWICR for pricing
search = CWICRSemanticSearch()
costs = {}
for category, volume in quantities.items():
    results = search.search_work_items(category, limit=5)
    if not results.empty:
        avg_price = results['unit_price'].mean()
        costs[category] = volume * avg_price

print(f"Total estimate: ${sum(costs.values()):,.2f}")
```

## Best Practices

1. **Use appropriate mode** - `basic` for quick analysis, `complete` for full data
2. **Include bbox** - Required for spatial analysis and visualization
3. **Batch carefully** - Large files may take time; process overnight
4. **Validate output** - Check element counts against Revit schedules

## Resources

- **GitHub**: [cad2data Pipeline](https://github.com/datadrivenconstruction/cad2data-Revit-IFC-DWG-DGN-pipeline-with-conversion-validation-qto)
- **Download**: See repository releases for RvtExporter.exe

「開發程式設計」分類下的熱門技能

datadrivenconstruction 的其他技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。