Trying to get parameters of nested families in a directory to excel.
The problem I am facing is with the headers in the excel sheet. Can’t seem to export the names of the parameters as the first row in the excel sheet. I think the problem is with the node “List.AddToFront”.
Images of Excel - All the parameter names come in the first sheet
The rest of the sheets:
Any ideas on how to solve this issue?
Hi @waqar.a.khan949 ,
Your Dynamo screenshot is unreadable, could you take another screenshot zoomed in with the Camera tool in the top right corner?
Hi @Daan, if you download the image and than zoom in you can view the graph clearly
Oh I see! Have you tried using a list.create/ list.join node instead of the list.additemtofront?
Yes , can’t seem to figure out the work around for this issue yet
@waqar.a.khan949 This should be an easy fix.
Can you please turn on the preview for these nodes?
Yes I also feel like it should be easy but can’t seem to figure out. Here you go @AmolShah
Are you writing to one Excel sheet or multiple? It looks like your data structure is setup for multiple sheets.
@waqar.a.khan949 Try this: Export to Excel.dyn (40.7 KB)
Probably not a good idea to use List.Map because it screws up the list count if GetParameterValue node is not able to fetch the value.
Hi @AmolShah , thank you for helping out and trying for a solution in dynamo.
I tried your dynamo graph. I get the following results:
The parameter names (headers) are repeated as seen in the image below:
Also getting this warning:
I have also attached my dynamo file if you want to run any tests.
Get Parameter Values In Excel 5 test 3.dyn (58.7 KB)
As I am doing this for a set of files in a directory, I am writing to multiple sheets and the name of the sheet is based on the document’s name.
Try this Export to Excel.dyn (30.9 KB)
and ignore the warning.
Hi @AmolShah ,
Thanks again. This is very much close to the solution.
The problem that now I see is that, some families have additional parameters meaning that the header is not constant for some families, so some parameter values are not in the right columns as seen in the graph. What could be the solution for this. One way is to add a header if new parameters are there.
In this case you would likely have headers and values for every possible parameter. You just leave some of them blank if they don’t exist (which should be what Dynamo returns if there is no value anyway).
Can you demonstrate this with the dynamo graph please
There’s nothing new to show. You just need to get all parameters from all elements so that the headers all align.
@waqar.a.khan949 This would try to get all parameters from the sub-families. If parameter is not present, it will stay blank.
Export to Excel v4.dyn (36.1 KB)
Hi @AmolShah ,
Thank you so much for helping out. I will mark this as the solution
But I was wondering if it is possible to get the family and type name of the nested family also exported as a parameter to the excel to identify the family instance? … Another scenario would be to get all type and instance parameters of the family instances.
Right now the values in these parameters are blank: