Learn how to export object parameters and their values to Excel.
01. Suppose the above facade had been passed on to you where you are required to schedule the surface area of each panel. And as you may be aware Revit will provide the entire panel area (including the area of openings) by default which is not the case here as you only need the material area of the panels.
04. In the above image... The first Node "Family Types" will select the adaptive component family named "Triangular_Panel". The second node "All Elements of Family Type" will select all the instances of that adaptive component. On the other hand "Element Geometry will list the geometric composition of each instance. In other words, a each panel is composed of a series of lines and surfaces.
05. Refer to below image... Please install the package "Spring Nodes" from the Package Manager in Dynamo. Now connect "Element Geometry" to "Springs.Filter.ByClassName" to filter out only the surfaces from the previous node.
06. Notice in the above image that each adaptive component panel was modeled with 3no. surfaces. The area of these surfaces is reported using the "Surface Area" node.
07. Since the project was modeled in mm we will use the "Convert Between Units" node to change that to meters squared.
08. In the above image we will add 3no. sub-surface areas in order to get the final area of each panel.
09. In the above image, we are only adding a title to the results notice that "Material Area" appears in the List to the right.
10. In the below image, the same is applicable to the "Panel Name" and the "Element ID".
11. In the below image create a List for the three parameters from the previous step and connect them to "Excel.Write To File" node. Add a file path to an Excel sheet and name in "Testing".
Note there is no need to pre-save an Excel file with that name as once you hit Run, Dynamo will create that Excel file for you; eventually you should see it blinking in your task bar.
12. As a result you will notice that the data had been written horizontally (See below image) in Excel whereas we actually need it to appear properly in columns with titles on the first row.
13. In order to solve this issues use the "List Transpose" Node as shown in the below image.
14. Once you Run the data will appear in Excel as shown below.
15. What if I would want to add three more Type Parameters to be filled in the Excel sheet?
16. Select any of the Triangular panels in Revit then Edit Type where you will see parameters such as "Manufacturer", "URL" and "Description" See below image. Let us now add these type parameters to the Excel Sheet.
18. Now compile the new set of titles with the parameter results as demonstrated below. The final list to be exported appears on the bottom right of the below image.
19. Connect the final list to the "Excel Write To File" node as in the below image and run the definition.
20. Open Excel to see that you have completed the Tutorial. See below image.
05. Refer to below image... Please install the package "Spring Nodes" from the Package Manager in Dynamo. Now connect "Element Geometry" to "Springs.Filter.ByClassName" to filter out only the surfaces from the previous node.
07. Since the project was modeled in mm we will use the "Convert Between Units" node to change that to meters squared.
08. In the above image we will add 3no. sub-surface areas in order to get the final area of each panel.
09. In the above image, we are only adding a title to the results notice that "Material Area" appears in the List to the right.
10. In the below image, the same is applicable to the "Panel Name" and the "Element ID".
11. In the below image create a List for the three parameters from the previous step and connect them to "Excel.Write To File" node. Add a file path to an Excel sheet and name in "Testing".
Note there is no need to pre-save an Excel file with that name as once you hit Run, Dynamo will create that Excel file for you; eventually you should see it blinking in your task bar.
12. As a result you will notice that the data had been written horizontally (See below image) in Excel whereas we actually need it to appear properly in columns with titles on the first row.
13. In order to solve this issues use the "List Transpose" Node as shown in the below image.
14. Once you Run the data will appear in Excel as shown below.
15. What if I would want to add three more Type Parameters to be filled in the Excel sheet?
16. Select any of the Triangular panels in Revit then Edit Type where you will see parameters such as "Manufacturer", "URL" and "Description" See below image. Let us now add these type parameters to the Excel Sheet.
17. Maximize Dynamo again. As in the below image, connect List Transpose to the group of nodes on the right. These nodes will create a list of all Parameter Names that will be exported to Excel.
18. Now compile the new set of titles with the parameter results as demonstrated below. The final list to be exported appears on the bottom right of the below image.
19. Connect the final list to the "Excel Write To File" node as in the below image and run the definition.
20. Open Excel to see that you have completed the Tutorial. See below image.