Sheet Data Updater.dyn (80.0 KB)
Sheet Data.xlsx (14.5 KB)
Hi All,
I have created a dynamo script to update the parameters in the Revit file. Using the Excel file. But the script is working fine for the parameter that has a “yes” or “no” value and it is not working for the parameter that has a text value in the following condition if the parameter value is removed in the Excel file and then run the script it will not remove the text parameter value in Revit. but it works when there is no value in the Revit and added value in Excel and then run the script it will update the parameter value in Revit.
I am unable to figure it out this issue, can anyone help me with this issue?
Hello, there.
There are some things I could identify:
First, you are converting numbers to strings, but is not clearing the precision Dynamo adds (,000000). By the way, why convert the numbers to strings, then converting it back to number?
When converting numbers to strings, if you wish to maintain it without the fraction, you could do something like this imeddiately after converting:
This way you won’t have a “1” read as “1.000000”
Secondly, the spreadsheet’s empty values are being read as nulls. You need to convert all nulls to empty strings, so they can override the value of the parameter. Otherwise, dynamo will just give an error, because you are not feeding a string.
Third, I can’t see what you are checking for nulls in the image below. This data set has 0s and 1s, so maybe you want to filter which are 0 and which are 1? It’s not clear your objective here.
Lastly, you are feeding the headers with the data. I wouldn’t do that, because you are always going to have some insconsistent data being fed.
All in all, it feels like just a little inconsistency with data converting and formatting, and some need for list management.
2 Likes
Hi @pedruccioli,
Thank you so much for analyzing the script and sharing your thoughts. It helped me to fix the error in my script and now the script is working as per my requirement.
1 Like