Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Read exported schedule in Python?

0 REPLIES 0
Reply
Message 1 of 1
mariomelendez
278 Views, 0 Replies

Read exported schedule in Python?

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.

 

 

Labels (2)
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


Technology Administrators