Possible to export 3 columns of EXCEL data to blank REVIT Area parameter fields?

I have an Excel spreadsheet with 3 main columns of data that represent data that I would like to “push” into blank AREA property fields in REVIT . The reason for this is because the government provided me this data and I do not want to have to recreate it all from scratch in REVIT as it is 877 rows long!
I can provide the Dynamo routine i currently have started to construct and the Excel spreadsheet if it helps.
Dave





This is actually pretty easy to do…as long as you have some way to tie the data in the Excel to the Revit Element(s).

So of those 3 columns, one of them needs to already exist in the Revit element (for instance- if the first column is Room # and that is what you want to use to tie one row of the Excel to one element, then you need to make sure that the Rooms in revit are already numbered - otherwise how do you distinguish which row of data goes to which element?). So there has to be at least one initial pass (or maybe there already has been) of 877 human data entries into Revit.

If you already have a common piece of data in both, then it is pretty simple - i would suggest uploading your script here to get help and let us all know how you intend to associate the two datasets together.

Ben,
As you can see in the previous attached images, I have the properties existing for filling out for each Area that will be placed on the Area plan, but they are blank. What I did was place 900 areas in an array, then deleted those same areas in plan. That left a schedule that matched 900 areas with blank fields for the most part in REVIT, that I was hoping I could get those fields populated via the EXCEL data. Normally I would try a key schedule to handle this but that has it’s own problems exclusive to Areas 1.) I cannot get all of the Area properties by default and 2.) Still need to get Excel data into REVIT for parameter population.

Dave-
From what I gather from your comment, it seems that you are not really concerned with matching one row of that Excel to a specific Area. I was thinking that you already had the areas placed contextually in a model, so the values for the “Weather Shelter” did not need to be fed into the Area that would obviously be the “Auto Paint Booth”. Since it is seemingly arbitrary, that makes things even easier (meaning the first Area that Dynamo encounters can get the Data from the first Row, the Second Area can get the data from the second row, etc…).

Attached is m image of a quick example i generated with 3 empty Areas and a picture of the workflow i used to feed in the Excel data. Use “SetParameterByName” to feed in the data to the Areas - note that the parameters must exist in the Areas, so you will have to make some project parameters or shared parameters if you dont already have them. Also note that the parameter category must match the data coming from Dynamo (there is a chance that you might think you are feeding a number to Revit, but Dynamo might be understanding that data to be a string or vice versa - this would cause an error)

Also, i am not sure what the “GetParameterByName” “==” “CountTrue” testing in your script was for, but i think you might need a “Transpose” node between the “Deconstruct” and the “List.FirstItem”

Ben,
I am getting the "Parameter’s storage type is not a number error on the SetParameter node for “CCN”…How do I fix this? The parameter is not any different than the others, it is just a text parameter I added for the Area categories…?

Hi @Dave_Vaughn
"String.FromObject" will do the the job before feeding to “Element.SetParameter” node.

I am assuming your parameter storage type is string here.

Not following you here, sorry.
Those 3 string nodes sitting by themselves were just used as a replacement for the Code block that had all three parameters declared…I was thinking it was the way I was doing that that broke this but the strings did not solve the error.
Not sure how to use the “String.FromObject” node.

String.FromObject is a node to convert to string. You need to connect your “CCN” parameter values (Which is from codeblock X2) to “String.FromObject” before feeding it to set parameter.

Another option would be to add a “True” boolean to the "Excel.ReadFromFile for the “ReadAsStrings” option.

I think you mean code block X1 for CCN…?

Ben,
“True” Boolean worked well in this case.I get a weird error on the last set parameter node…but it still works.