Hello everyone,
i’m currnetly trying to work with and understand schedules in Dynamo.
As one of the first steps i wanted to get the values of a schedule into a list in Dynamo.
Therefore i was using the GetCellText() method in the following code.
import clr
import sys
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
schedule = UnwrapElement(IN[0])
sched = schedule.GetTableData()
body = sched.GetSectionData(SectionType.Body)
row_count = body.NumberOfRows
col_count = body.NumberOfColumns
ct = []
for row in range(row_count):
for col in range(col_count):
cell_text = body.GetCellText(row, col)
ct.append(cell_text)
OUT = ct
As a result i’m left with many empty strings. How does this happen and what do i need to change? I’m using the Autodesk Golden Nugget project in RVT 24.
I’ve tried it with different schedules but the outcome is the same.
Thanks for the help in advance!