Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Read exported schedule in Python?

0 ANTWORTEN 0
Antworten
Nachricht 1 von 1
mariomelendez
342 Aufrufe, 0 Antworten

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.

 

 

Beschriftungen (2)
0 ANTWORTEN 0

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report