Dynamo to Excel data issue

good morning everyone! I have some problems and do not how to procceed… if anyone could help me, that would be great, I have no knowledge of python, yet, but, I believe that this problems would be solved by it, the thing is, in the model, the rooms have 3 project parameters: bahia, connecting and level (note: not “Level”, not the default Level one)

I need the routine to read those parameters and write them to excel, this is easy, I know, stay with me here… the thing is: the format of the excel must be like this:

Row 1: bahia values

Column A: level values

Body: Room Names, in a certain way that looking at any room number I must be able to read level and bahia…

That is not that difficult, in fact, I manage with some transpose, list combine and a couple of helpers more… I attach a capture of the parameters, the routine and the matrix to csv routine (I don’t have excel in this pc, so I’m using csv temporarily… BTW I am testing this routine in the sample advanced project of autodesk,

Versions: Revit: 2019.2

            Dynamo: 2.0.3

            Custom Nodes / Packages: None

the problem is, when There is a blank in a level, I mean, in some projects there is no room in bahia 23 of level 17, but there is room in bahia 24 of level 17, in that case, the spreadsheet is supposed to be left blank… that is what is not happening in this routine… do you have any idea??

34.Matrix to CSV_(COMPLETE).dyn (66.1 KB)

The yellow warning at the end is because I had the CSV file open at the “RUN” time, sorry

Could you also upload a corresponding Revit Model?

Because now i can only imagine the problem lies with the empty input, maybe try replacing that using a Clockwork Package node “ReplaceEmpty”.

right, sorry, I will upload the project I have been using, thank you @Daan

the file is too big to upload here, it is just the sample model with some parameters and some other extra stuff… you just need the room schedule for this problem, thank you again

I’ll take a look at the script :slight_smile:

Why are you writing your data to csv instead of directly into Excel?
PS: Also please do not rename nodes, just use Ctrl+W for explanation.

sorry @Daan the reason is because i do not have excel on this pc, after being sure that the routine is ok, the idea is to get rid of the export to csv node and work with the excel one… the rename nodes is because they are being used as inputs for the dynamo player, as this routine is for non dynamo users

Okay i see, i’ll try to work around those things :slight_smile:

Okay i am almost done, but would you like me to write to csv or excel?

Nevermind the last post, i made both :smiley:

They both use your Inputs, but you need to be careful with that because the Parameter Names are Case Sensitive: level =! Level

Dyn Files:

Data to CSV 21-01-2020 LievX.dyn (70.3 KB)
Data to Excel 21-01-2020 LievX.dyn (58.4 KB)

  • Daan

I know, we need to use the level parameter, not Level, it is a project parameter created in each project by the client, obviously, not by us… thank you so much!! I will check them out this afternoon

to prevent this you could also use a string.contains node and turn of the case sensitivity, then filter all parameters by this input. Then take the Parameter value as normal but now without having to use the exact name.