VietPer.

A .NET publication · published by VietPer

← Back to VP_RevitAPI

Excel legend sync

Sync legend data between Revit and Excel.

Ribbon location:
VP_LAYOUT > Excel Link
Command:
ExcelLegendLinkSync

1. Purpose

Links an Excel Defined Name into a Revit legend and pulls that content into the legend one way — Excel into Revit, never back — from a single dialog; material schedules and symbol legends authored in Excel flow straight onto sheets. Use it when legends churn with the design and redrawing tables in Revit is not an option.

2. Quick video (≤ 2 minutes)

[Video in production — follow the steps below for now.]

3. Steps

  1. Prepare the Excel file (.xlsx/.xlsm/.xls) with a Defined Name over the table to place. [image 01: Defined Name range in Excel]
  2. Click Excel legend sync in the VP_LAYOUT tab, Excel Link panel (an open legend is picked up automatically).
  3. In the dialog, click Chọn file to pick the Excel file — the Defined Name list fills in by itself — choose the right name, then press Liên kết Legend. [image 02: file-and-Defined-Name picker dialog]
  4. The tool draws the Excel content into the legend; if the active view is a sheet, the legend lands on that sheet by itself — check the table on the sheet. The dialog also offers Làm mới — a destructive reset that deletes the managed linked image and clears the legend's VP_Excel_ link metadata, so press it only to start the link over — and Kiểm tra (inspect link errors). To pull new Excel content into an existing legend, run Update active legend instead. [image 03: synced legend on the sheet]

4. Real-world example

A 40-row electrical symbol legend lives in Excel and the client changes a few symbols weekly. Name the range "Symbols_Elec", open the symbol legend, run the command, pick file plus name, press Liên kết Legend — the legend follows Excel within a minute. Next week Excel changes; with the legend open, run Update active legend and the drawings catch up.

5. Common errors

Symptom (tool message, Vietnamese)Fix
"Vui lòng chọn đường dẫn file Excel hợp lệ."No file picked, or it was deleted/moved — reselect an existing .xlsx/.xlsm/.xls
"Vui lòng nạp và chọn một Defined Name."No Defined Name selected — choose 1 name from the list after picking the file
"Liên kết Legend thất bại." with a summaryRead the summary (parse errors...) — check the Excel range for merged cells or odd characters
Legend placement error on the sheetThe legend already sits on another sheet — delete the old instance and rerun

6. See also