Skill 詳細

excel-to-rvt

Excel-to-Revit integration, not general spreadsheet work.

一致度一致の可能性excelスプレッドシート 向けにレビュー済み
出典datadrivenconstruction/ddc_skills_for_ai_agents_in_construction外部ソース
報告インストール数75人気度の参考値

使用前に確認

自動レビューは関連性のみを確認し、安全性や推奨を保証しません。使用前に出典の説明を読んでください。

保存された出典プレビュー

SKILL.md

これはレビュー時に保存された抜粋です。完全で最新の内容は外部ソースを確認してください。

---
name: "excel-to-rvt"
description: "Import Excel data into RVT projects. Update element parameters, create schedules, and sync external data sources."
homepage: "https://datadrivenconstruction.io"
metadata: {"openclaw": {"emoji": "📄", "os": ["win32"], "homepage": "https://datadrivenconstruction.io", "requires": {"bins": ["python3"]}}}
---
# Excel to RVT Import

> **Note:** RVT is the file format. Examples may reference Autodesk® Revit® APIs. Autodesk and Revit are registered trademarks of Autodesk, Inc.

## Business Case

### Problem Statement
External data (costs, specifications, classifications) lives in Excel but needs to update Revit:
- Cost estimates need to link to model elements
- Classification codes need assignment
- Custom parameters need population
- Manual entry is slow and error-prone

### Solution
Automated import of Excel data into Revit using the DDC ImportExcelToRevit tool and Dynamo workflows.

### Business Value
- **Automation** - Batch update thousands of parameters
- **Accuracy** - Eliminate manual data entry errors
- **Sync** - Keep external data in sync with model
- **Flexibility** - Update any writable parameter

## Technical Implementation

### Methods
1. **ImportExcelToRevit CLI** - Direct command-line update
2. **Dynamo Script** - Visual programming approach
3. **Revit API** - Full programmatic control

### ImportExcelToRevit CLI

```bash
ImportExcelToRevit.exe <model.rvt> <data.xlsx> [options]
```

| Option | Description |
|--------|-------------|
| `-sheet` | Excel sheet name |
| `-idcol` | Element ID column |
| `-mapping` | Parameter mapping file |

### Python Implementation

```python
import subprocess
import pandas as pd
from pathlib import Path
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass
import json


@dataclass
class ImportResult:
    """Result of Excel import to Revit."""
    elements_processed: int
    elements_updated: int
    elements_failed: int
    parameters_updated: int
    errors: List[str]


class ExcelToRevitImporter:
    """Import Excel data into Revit models."""

    def __init__(self, tool_path: str = "ImportExcelToRevit.exe"):
        self.tool_path = Path(tool_path)

    def import_data(self, revit_file: str,
                    excel_file: str,
                    sheet_name: str = "Elements",
                    id_column: str = "ElementId",
                    parameter_mapping: Dict[str, str] = None) -> ImportResult:
        """Import Excel data into Revit."""

        # Build command
        cmd = [
            str(self.tool_path),
            revit_file,
            excel_file,
            "-sheet", sheet_name,
            "-idcol", id_column
        ]

        # Add mapping file if provided
        if parameter_mapping:
            mapping_file = self._create_mapping_file(parameter_mapping)
            cmd.extend(["-mapping", mapping_file])

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

        # Parse result (format depends on tool)
        return self._parse_result(result)

    def _create_mapping_file(self, mapping: Dict[str, str]) -> str:
        """Create temporary mapping file."""
        mapping_path = Path("temp_mapping.json")
        with open(mapping_path, 'w') as f:
            json.dump(mapping, f)
        return str(mapping_path)

    def _parse_result(self, result: subprocess.CompletedProcess) -> ImportResult:
        """Parse CLI result."""
        # This is placeholder - actual parsing depends on tool output
        if result.returncode == 0:
            return ImportResult(
                elements_processed=0,
                elements_updated=0,
                elements_failed=0,
                parameters_updated=0,
                errors=[]
            )
        else:
            return ImportResult(
                elements_processed=0,
                elements_updated=0,
                elements_failed=0,
                parameters_updated=0,
                erro
GitHub で全文を読む (外部ページ)
関連情報

関連する仕事