Import Excel Columns to populate Shared Parameter Values in Revit

excel
revit
dynamo

#1

Hi All,

Pretty new to Dynamo. I’ve successfully imported or exported data to and from Dynamo before, but I’m having difficulty with a script/workflow at this stage.

The Problem:

Currently, the export to excel script works fine. Essentially, all it does is it exports the GUID’s, Sheet Names, Sheet Numbers and 5x Custom Shared (Text) Parameters. The export to excel script works without any issues (Although, would be nice to export/add headers). The import from excel script has warnings. Some of the warnings which I face is:

  • A warning pop-up appears, stating that “sheet numbers” already exists. Essentially, if I change a sheet number in excel, then it updates in Revit without a problem, but when I don’t change anything numbers in excel, then the numbers should just stay as is.
  • When I cancel the aforementioned warning and rerun the script, then it sometimes work, but sometimes changes a sheet number or the sheet name to a “null” string value.

Desired Result / Workflow:

  • Export data from Revit to Excel (Script which is working, additionally, what can I do to add Headers?)
  • Then someone can add data to the excel files. In columns 3-8 for example.
  • Then data from Excel which has hanged, needs to be imported back into Revit, associated to the correct sheet. (Script with problems)
  • What is wrong with the “Import from Excel” script? What am I missing and if there is a better way of going about it, please let me know. After I import the data from excel to Revit, it should populate the data accordingly.

I would just like to add, the reason why I would like to make use of the GUID as a “driver to and from” excel is because if someone removes a sheet in Revit, then It would not matter, or if a user adds (or removes) a row in excel, it would not matter.

I could not attach sample files & scripts, because I’m a new user. I uploaded the files to WeTransfer which can be downloaded here: https://we.tl/t-OAutjXMPE6

Cheers!


#2

what do the errors say on the yellow nodes?
as far as i can read the picture you send the dynamo script is working exept for some values comming from excel, they may be numbers where text is required or the other way around
to make a better picture zoom in in dynamo until you can read the node names, then click the camera button in the top right of your screen.
for headers see


#3

Hi @Marcel_Rijsmus,

Thanks for your post. Below is the error message which appears.

Dynamo_Warning

As you mentioned, the script actually works, but it’s not 100%.

It imports the values to the correct parameters, corresponding with the exported GUID’s.

BUT, then it changes the sheet name value to “null”. This will be a problem for obvious reasons.

Cheers!


#4

I can only post one image at a time, here is what happens to the sheet names:

Dynamo_Warning_01

What seems to be the problem? And once again, if there is a better way of getting to my desired result as per my original post, please let me know.

Cheers!


#5

Hi All,

Any ideas as to what could be done or improved?

Cheers!