I have a set of objects, each object has various property sets, and every property set contains different number of properties with values.
i.e. object lists={object1, object2, object3…};
property set={ps1, ps2, ps3, …};
property for each property
ps1={p1-1, p1-2, p1-3};
ps2={p2-1, p2-2};
ps3={p3-1}etc.
I would like to know how to create lists to represent the structure and how to extract those information to excel. thanks a lot!!


I think you’re going to need to show us an example. The structure kind of builds itself based on the relationship between “objects” and their inherent structure. How to structure that for Excel is up to you.
Thanks for your reply, I create a simple dynamo as the attached file, please advise how to modity my script to complete the function, thanks!
loop_test.dyn (28.5 KB)
The syntax of List.Join
actually requires that the inputs are given as a single list, since the node has dynamic inputs (you can select how many lists to join). It should look like this:
result=List.Join([result,temp_list]);
You’ll also need to declare result
ahead of time since the first time you define it is in reference to itself (and it doesn’t exist yet).
That fixes your custom function, but I don’t quite see how that relates to your initial question of unknown structures. I think there’s still a better solution here.
I follow you advice to modify my script to overcome the list problem, and have my initial question settled. However, I came across problem to export the lists to excel. I have a presssure pipe network which was generated with CIVIL 3D and the network contains various types of objects (Pressure pipes, Fittings and Appurtenances etc.,) and each object is accompanied with a set of data (Propperty Sets), I created a dynamo script “Export_PS_to_Excel-V3.dyn” that export data to excel.I wanted the script output a file like “Export_PS_demo-Target.xlsx”, but the output file somehow is “Export_PS_demo-V3” with “error” as attached. Therefore, I changed the script to “Export_PS_demo-V2” and export the lists to seperation sheets with the result as “Export_PS_demo-V2.xlsx”. I uploaded all the files for your reference and seek your help to solve such problems, thanks!
Export_PS_demo-V3.xlsx (145.8 KB)
Export_PS_demo-V2.xlsx (326.4 KB)
Export_PS_demo-Target.xlsx (261.9 KB)
Export_PS_to_Excel-V3.dyn (199.0 KB)
Export_PS_to_Excel-V2.dyn (207.4 KB)
demo.dwg (7.4 MB)
When sharing screenshots you should always pin the node preview bubbles. Right now we can see all the nodes you’re using but none of your actual data. We have no idea what you’re actually passing on to excel and therefore can’t give you any suggestions on what to fix or where the problem may even be occurring. I would guess that your data input is not correctly structured. Excel data has to be a singular list of lists for each sheet.
screenshot is uploaded, thanks!
It’s hard to follow with so many nodes overlapping and some not showing their data output. It seems like your list structure is at least valid but you don’t need list levels with the input structures you’re using (from what I can see). However, it does look like you’re providing the same file path and sheet name for all exports. That’s just going to overwrite data and may cause confusion with trying to access the same file multiple times at once.
Thanks for your comments, I joined the lists for each type of object and wrote to seperated excel sheets. I got the result what I desired finally. 