Extracting Revit Family Parameters and Exporting to Excel – Extension for Parameter Groups and Column Arrangement

I have created an initial Dynamo script that successfully exports all parameters of a Revit family to Excel, and the values are displayed correctly.
Now, I would like to extend the output to include the corresponding parameter groups (e.g., Identity, Dimensions, Material and Finish, etc.). In addition, the parameter names should appear in the first column, listed vertically.
So far, I have not been able to achieve this, despite attempts using List.Insert and List.Join.

I kindly request assistance or an example demonstrating the correct way to retrieve the parameter group and structure the lists/tables appropriately for Excel export.

This sounds like a job for weaving lists:

Thank you very much @john_pierson, I have integrated it into my script, but unfortunately it does not combine the values from Parameter.Name and Element.GetParameterValueByName and I get a list with ‘0’ zero back. I have attached a screenshot. Perhaps you can help me further.

Ah I didn’t realize you had lists that were nested even deeper.

You need to experiment with List@Level

Thank you for your comment. I will take a look at it right away.

Perhaps you could give me another tip on how to sort the lists with the parameter names not alphabetically, but by parameter groups, as in the family. I need an Excel table with the type and instance parameter names, a family, and the respective values contained in the parameter, preferably in that order.

In 1 and 4, you can see the parameter names and values.

Many thanx.