Hi all, I am new to dynamo and am trying to pull data from hand selecting plumbing fixtures and export that an excel sheet to allow for piping calculations. I have searched online multiple times and added certain items with no success. I am using dynamo 184.108.40.20683 and excel 2010. When i hit run, i get an excel write to file operation failed. I have also tried adding the path.to file input between the file path and excel.write to file but get input errors. What can i be missing here? Thanks in advance for any help you could provide.
Try and clear out the nulls. As of now you would only receive an excel file with no data in it, which may be why it is failing.
@til.shviger, i am trying to have the users select only certain fixtures within the model as you go. Then this information would be pushed to an excel sheet to size pipe as the user moves through the building. Element type would select more than what i am attempting to do wouldnt it?
@JacobSmall, the only null i get is at the end when creating an excel sheet? I am, however, not sure why my lists arent giving me the actual data of the families - only providing me 0-4 lists in this case.
Im curious if i should be using excel 2013 in lieu of 2010…
im think at first step you are must get not empty data (get exist values of parameters)
and later ask about export them to excel
It appears that you are asking the elements (an instance) to give you a result for a type parameter. Ask @til.shviger suggested place an element.type node after the selection node to be able to get type parameter values.
Alright, i now think i have it pulling the right data per type not instance. I think that now gets me to the export to excel error?
A few questions:
can you tell us what the error is now? Expand it and send a screenshot or copy paste.
what version of excel are you using? 2010 could be the issue but I would have to confirm. As a workaround you can try using a csv to get the data out of Revit and into excel.
What is the next step in the workflow? Like what is the intended activity in excel and how do you ‘get back’ to the model afterwards? Would it possibly make sense to build a UI around the task utilizing Dynamo player and not have people bounce between programs?
@JacobSmall, so i have modified the previous image just a bit to allow grouping of same elements. All other aspects of the script are the same with the exception of the below image. Now when i hit run, i get “Warning: Excel.WriteToFile operation failed”. To answer your other questions, i will try the csv here in a bit, but i will also try 2013 excel when i get a chance to get our IT department to get it. As for the workflow, the data is intended to be pushed to an excel sheet where calculations are run to indicate pipe size. This would then require the user to go back and manually change the pipe size supplying the certain areas in the building. This task currently involves manual calculation and input into the excel sheet. We have looked into having revit run these calcs but long story short, there were multiple problems and revit doesnt calculate all of the necessary data we would like. A UI would certainly be an option for future, for sure. Thanks for your help so far btw.
- paste “True” in boolean node
- try use code block (write inside x) :
3. if paragraph 2 not work try use code block (write inside x):
I tried both of your suggestions. Still the “Warning: Excel.WriteToFile operation failed” problem. See image, also is there a reason the quantity of data is different?
List lengths look good. Flattening would only serve to get you a really long single row of data. Try CSV and let us know if that holds things up. Remember excel can open those automatically so they are almost as good - but your users will have to save as an xlsx afterwards. I’m looking into the excel version now.
EDIT: Have you previously had another version of excel on this machine?
Good news…the csv works. Still not sure why the excel wont. And @til.shviger i used both of what you suggested but the list results were the same for flatten and the code block.
Not that im aware of. Has been 2010 since i got it. Looks like there is some cleanup of excel that needs to take place per your link…
do you use bumblebee?
but …i think its similar…
Is this still a problem with Excel 2016? A coworker can run his script with no problem but I get the Excel.WriteToFile errors. We both have excel 2016 and Dynamo version 1.3.2 (latest).
I have deleted the 1.9 registry key like the old 2010 article suggest (I do not have a 1.8 entry, my guess is because my excel 2016 is newer) and I still cannot write to the same file he can on our server. Even if I place the dyn script and a copy of his excel file on my desktop it will not write. I have tried with the spreadsheet open in excel and with excel closed and same error.