本文へ移動
cccskills
無料GitHub で公開

rvt-to-excel

Convert RVT/RFA files to Excel databases. Extract BIM element data, properties, and quantities.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md6.6 KB
  • claw.json442 B
  • instructions.md1.4 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

RVT to Excel Conversion

Business Case

Problem Statement

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

RvtExporter.exe <input_path> [export_mode] [options]

Export Modes

ModeCategoriesDescription
basic309Essential structural elements
standard724Standard BIM categories
complete1209All Revit categories
customUser-definedSpecific categories only

Options

OptionDescription
bboxInclude bounding box coordinates
roomsInclude room associations
schedulesExport all schedules to sheets
sheetsExport sheets to PDF

Examples

# 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

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

SheetContent
ElementsAll BIM elements with properties
CategoriesElement categories summary
LevelsBuilding levels
MaterialsMaterial definitions
ParametersShared parameters

Element Columns

ColumnTypeDescription
ElementIdintUnique Revit ID
CategorystringElement category
FamilystringFamily name
TypestringType name
LevelstringAssociated level
AreafloatSurface area (m²)
VolumefloatVolume (m³)
BBox_MinX/Y/ZfloatBounding box min
BBox_MaxX/Y/ZfloatBounding box max

Usage Example

# 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

# 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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Create 4D construction simulations by linking BIM elements to project schedules. Generate time-based visualizations, sequence analysis, and construction phasing with Gantt integration.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

Analyze 5000+ IFC and Revit projects at scale for patterns, benchmarks, and insights. Big data analysis for construction.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

Check construction AI systems against the EU AI Act (Regulation 2024/1689): classify risk of estimation, scheduling, CV and agent tools, document transparency, keep human oversight. Use when deploying or auditing AI in construction.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

Orchestrate multiple AI agents for construction workflows: estimator, scheduler, document, QA and safety agents coordinated by a supervisor agent, with human checkpoints. Use when automating end-to-end project processes with agentic AI.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

Create Apache Airflow DAGs for construction data pipelines. Orchestrate ETL, validation, and reporting workflows.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

Automate as-built documentation and digital handover for construction. Compile project records, generate O&M manuals, create asset databases, and ensure complete project closeout.

日本語の概要は準備中です。原文の説明を表示しています。

datadrivenconstruction/DDC_Skills_for_AI_Agents_in_Construction3472026年8月22日 更新

datadrivenconstruction のスキルをすべて見る

このスキルの問題を報告する