Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Read exported schedule in Python?

mariomelendez
Advocate

Read exported schedule in Python?

mariomelendez
Advocate
Advocate

Hi,

 

Has anyone tried to import a revit schedule in tab-delimited format into Python, using Pandas? Thought I'd give it a shot, but I'm stuck. I have a regular old schedule coming from a material takeoff, I export to text. I export column names only, with tab as a delimiter and regular quotes as text delimiter.

 

In Revit I have something like this:

 

mariomelendez_0-1612931686365.png

 

Export and I get this in the text file, which is what I expect:

 

mariomelendez_1-1612931730523.png

 

 

In Python, I grab the file using Pandas:

 

   df = pd.read_csv(file_name,sep='\t',quotechar='"',header=0)

 

And then I print to see what I got:

 

Import 0: material-original.txt
Index(['��"', 'Unnamed: 1', 'Unnamed: 2'], dtype='object')
Empty DataFrame
Columns: []
Index: []

 

I don't get why the column names aren't being imported, and of course, no data is imported either. Despite the separator being set to tab. Tried telling Revit to export with a comma delimiter, and this time the importer crashed without even trying.

 

 

0 Likes
Reply
348 Views
0 Replies
Replies (0)