Get Coordinates from Multiple Models into one Excel file

Hi everyone, I´ve just started with Dynamo today…

I need to get the Project Base Point (PBP) coordinates from multiple models and create one Excel File with all the information.

So far I figured how to to get the coordinates of one model into one excel file:

Then I´m using Dynamo Multiplayer from BirdTools, to batch process all the Revit models, but the problem is that it overwrites the cells in the Excell file instead of making a list.

Do you know why? I believe it has something to do with the script.

Thanks!

You’re writing the coordinates to one row in one location, so yeah, it’s going to replace each time. It would probably be easier to just append the information to a CSV that could then be read in Excel.

Alternatively, you could read the Excel file first to see how many rows of data already exist and use that to determine the next available row.

1 Like

Thanks a lot for your great ideas, I´m going to try the second one!

Any help for how to make Dynamo read the excel file and check for the next available row?

Just read the file with Data.ImportExcel and count the number of rows in the dataset with List.Count.

1 Like

ok, I´m not sure if I´m doing it properly…

First, the headers repeat with every new set of coordinates.
image

Second, if I connect the same file path to de DATA.ExportToExcel it gets into a boucle and i have to kill Revit to stop it.

Any ideas what I´m missing here?

You’re adding the headers to the data each time so that’s expected. If you only one them once then you should include a condition for when to append the header to the start of the list. This would likely be only when the existing excel data is empty (list length = 0).

You’ll also want to make sure you’re running your graph in Manual mode so that the data doesn’t cycle on update and get caught in an infinite loop.

1 Like