Writing revit data into excel


Please see attached images.

All the shared parametrs I’m trying to write into excel are instance parameters. Not sure why the connection size did not write into excel. Other issue is data from revit is different from excel.

Refer to the attached for the updated output.

Hi Benjamin,

Could you drop your files here so that we can provide you better and quick solution. Thanks :slight_smile:

Do the Element.GetParameterValueByName nodes output anything?

It does output the value of mark, airflow and presure drop (as per last attachment) but the value for airflow and pressure drop are incorrect. On the other hand, the value for connection size is blank.

@Kulkul, i will upload the files later this noon.

The values may be incorrect because of internal(?) units of revit or dynamo…i think that if you divide the value in dynamo by the value revit you will get a constant.
Could you try using Object to String to convert the values in strings before feeding them in the excel? I don’t know if that’s the case but let’s try it

What’s up
Take a look at this script, to get all the information from the schedule to excel
i got it from Mr. @Lknapton

Hi Guys,
@Kulkul, file uploaded as requested.
@GregX, introducing Object to Excel before feeding to excel did not help
@JeffT, please see below image. It did not create schedule in excel. Not sure what I missed here?

Air Terminal Schedule.dyn (7.8 KB)

@JeffT, I changed the Level.Name to Element.Name but still nothing is happening.

Try to import REVITAPI and not Protogeometry in Python

# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *

@bvm76 drop rvt file.

@Kulkul, please see link to download the revit file as requested.

@Alberto_Tono, great it’s now working. The values are now also correct. But I still want to find out why my original graph is not working.

1 Like

Could it simply be the “overwrite” input in the first graph? Will it work with a new excel file?
EDIT: I tried it with Revit 2016 R2 and it works. Maybe some dynamo nodes won’t work in R2014.

Units are in imperial I think…forgot to change them, for the (easy) Size you just have to divide by 0.3048, for the other ones I’m too lazy to find out, but a simple calculator will do

What’s up, sorry i didn’t notice when you write back
ok if you check my Python

import Autodesk
from Autodesk.Revit.DB import *

but yours

from Autodesk.DesignScript.Geometry import *

try to make it same
Best Regards,

Thanks for sharing the code jeff, it’s now working.

Welcome :slight_smile:

You can try to add stringFromObject node between transpose and excel nodes. “Usually” it helps.

Thank you all guys for your help!

@JeffT, i tried to edit the python node so i can write my data into specific sheet of existing excel file rather than creating a new file but with no luck. I would be grateful if can show how to do it.