We have a standard Excel file that we would like to populate with parameter values for use by our service department. Currently, I can gather and export all the information to the Excel file, except for elements that are sub-elements connected to a main element. In this scenario, the main element is an AC outdoor unit with three indoor units connected to it. I need to export two parameter values (Model, Bestemming) to specific columns, but they need to be in the same row as the AC outdoor unit.
The challenge is that the standard export to Excel only allows us to select the start row, and this unit can be in different rows in various projects, making it impractical to report to a “standard” row. To address this, I’m considering sorting the elements based on the “codering” parameter. The main unit has the parameter value AC-02, while the indoor units are labeled AC-02a, AC-02b, and AC-02c.
I’ve attached the script to this thread. Could anyone help me figure out the last part of the script to achieve this?
How would you approach this in a better way? Do you have any suggestions to make this process better? At the moment its working as intended, without any errors (while the excel sheet is empty).
No, it’s not possible to filter the information needed with a schedule, unfortunately.
you can also just have it assemble a list and export parameters
yeah this seems pretty clear, if the column structure is always the same then you can just set the right columns. Otherwise I would recommend having the script read the excel file and checking parameter names to see which info goes where
Thank you for the tip.
The columns are always the same; the issue lies in exporting to the same row as the main component. In the screenshot, my information should be in row 12 and 14 instead of 1, 2 (the starting row).
I don’t think this will solve my problem. I understand where you’re going, and it should be simpler this way, but what it really did was put me back at 0. And I still don’t see how I can define the starting row for different elements. Sure, I get to export it all at once, but the row I need to export to is different for each project.
I can determine the data lacing through trial and error, but I’m encountering issues with the columns. It appears that the columns aren’t functioning as expected, as the system only takes the first column provided and exports data from that column onward. This issue likely relates to lacing, a concept I don’t fully understand at the moment.
Right click on “auto” in the bottom right corner of the same node and press longest lacing
SAVE! a wrong kind of lacing and testing might have your revit calculate x^x (x being the amount of elements) instead of x^2
While it is test running, you can read up on lacing in the primer (link below). I personally flatten most lists and avoid lacing as much as I can. But in this case it is unavoidable, unless you revert back to splitting everything up into several nodes https://primer.dynamobim.org/06_Designing-with-Lists/6-3_lists-of-lists.html
Unfortunately, it appears that when changing the data level to L2, it overwrites the same data with only 2 or 3 elements. Although the data input is sorted as desired, for some reason, it is not populating the correct columns.
Even though this is quite interesting, I still can’t figure out the initial question of getting the information from different elements into the same row as the elements they belong to (using the script that writes multiple times to excel).
Hi! You’re exporting AC outdoor and linked indoor unit parameters (Model, Bestemming) to Excel, managing diverse start rows in projects. Sorting by “codering” is smart. Finalize by identifying AC-02, exporting Model and Bestemming for it and its indoor units, ensuring the same row. Need more help? Share your script. Best of luck with Dynamo!
Hello, the script has been uploaded in the initial post. The discussion veered off course a bit as it would be more efficient to export to Excel with a single node instead of using 6 or 7 ExportToExcel nodes. Nonetheless, the script attached in the first post accomplishes the task; it just needs the final touch to align the data in the same rows.
Hello, I haven’t found a suitable solution yet. I reverted the script to its original state of writing to Excel multiple times because I encountered difficulties when attempting to make the script work with lacing. I’m hopeful that someone can assist me in finding a solution to accurately write the additional data to the correct columns and rows.