REVIT schedules exported to Excel cannot recognize the UniqueId

TRANSLATE BY MODERATION

The first code identifies the detail table, and the second code exports the detail table. Currently, exporting the detail table works fine, but the UniqueId column is consistently not recognized, which prevents the modified Excel file from being imported back into Revit.


第一个代码是识别明细表,第二个代码是导出明细表,现在导出明细表没问题,但是UniqueId列一直识别不到,导致无法将修改后的excel导回revit。

Op’s post translated:
UniqueId cannot be recognized when exporting Revit schedules to Excel

The first Python script node is to collect all ScheduleViews while the second is for exporting to Excel. The export works fine so far, but it fails to recognize the UniqueId column. Hence, I cannot import the modified Excel file back into Revit.

UniqueId Type System Abbreviation Diameter(DN) Length(m)
RowIndex_1 A YF 65mm 5.15
RowIndex_2 A YF 80mm 4.6
RowIndex_3 A YF 100mm 4.79
RowIndex_4 B ZP1 150mm 0.69
RowIndex_5 C W 150mm 21.99

Looks like a MEP schedule to me.

Op’s first python node collects all schedule view instances.

schedule_views = FilteredElementCollector(doc).OfClass(ViewSchedule).WhereElementIsNotElementType().ToElements()

Not sure what’s inside the second script, some formatting or housekeeping? But the export was successful. Are you using Revit’s built-in UniqueId or did you add this UniqueId yourself? It feels like you’re trying to use it to identify these MEP elements, bring the changes back into Revit, and update the schedule. In any case, you’ll need to provide more information so everyone can better help you.

there is a workround here to get the Ids by row

https://forums.autodesk.com/t5/revit-api-forum/quick-way-of-counting-rows-in-a-schedule/m-p/8497051/highlight/true#M70684

You can also add the IfcGuid column to retrieve the elements later.