Property set (Corridor Shape Information)

Hi everyone,
I’ve created a Dynamo script to export corridor solid material volumes based on their Shape Code. I’ve added a Property Set to the corridor solids, and as shown in the attached image, each solid includes multiple properties including the Shape Code and Volume.
My goal is to:

Filter the solids by unique Shape Codes.
Sum the cumulative volume for each Shape Code.
Export the results to Excel with only the Shape Code and total volume.

However, when I export the list, it includes all the information from the Property Set, not just the filtered and summed data I need.
Can someone please take a look at the script I’ve created.

You can download the drawing from the link below

Material Volume_Property_Data_set .dyn (27.5 KB)

image

I had the same problem, and I did not find a way to filter which properties to export. So, I had to work around it:

1. In Civil 3D I created my own property set for solids with two values – layer name and solid Volume:

2. When extracting my solids from corridor I use layer Name Template <[Construction Codes]> - <[Construction Corridor Name]>

This also allows me later on to filter solids by multiple corridors if needed.

3. After solids being extracted, I remove built-in property sets (Properties->Extended Data) and add my SolidProperty Set with only two values

4. Now I can extract my volumes to Excel.

PS This is not my idea; I found it on the web a while ago. Sure, it is bad that I lose built-in property set values, but I can always keep original solids with those values

Can you export your workspace as an image so we can see how your data is flowing though the graph? It sounds as if you need to extract one property from the property set but I’m without C3D for a bit so I can’t confirm without the image.

To save some time

Not sure if it’s what you ask for but I created a dwg-file with solids and each solid has three property set.
When use the node “Object.PropertySetByName in C3D 2025 you can filter the specific property set and the get all the value

I also changed the node from List.Create to List.AddItemToFront to get the titles on top. Not sure if it help you but I couldn’t get the result in the excel that I wanted.

Now I get this result instead

Material Volume_Property_Data_set_PaVe.dyn (36.1 KB)

Corridor Shape Information.xlsx (17.9 KB)

Property set (Corridor Shape Information).dwg (558.4 KB)

I might missed the “Sum the cumulative volume for each Shape Code”
You don’t do that in that script that you uploaded for now, correct?

Could you please check the drawing I uploaded? After extracting the corridor solid, each solid seems to have its own property set by default, and I also added custom properties to them. For regular solids, when we manually assign properties, the code exports them correctly. However, with the corridor solids, something strange is happening — they’re not exporting as expected, and I’m not sure why.

Property data set.dwg (3.4 MB)

it did not export the shape code and Corridor Names.

Material Volume_Property_Data_set_PaVe.dyn (35.6 KB)

Well, depending of the info from dwg it doesn’t work.

Try the updated script where I filtered out the visable propertydefinitions and I think it will help you to move forward

How would you go about it? I updated your script to extract data from Corridor Shape Information Property Set (specifically properties “CodeName” and “Volume”) and from Corridor Model Information Property Set (specifically property “CorridorName”) and joined the data in one excel list. So far so good, but I don’t have idea how to sum the volume (List#2) if CodeName (List#1) values and CorridorName (List #3) repeats

I’ve already done something simillar in the past and one thing I remember I did when I needed to get the sum of the values by code was using UniqueItems combined with List.AllIndicesOf and List.GetItemAtIndex and then Sum each list of values.

Don’t know if this workaround will do it for you, but I believe there are some ways to do so.


If anyone wonders, here is how I summed the cumulative volume for each Shape Code and Corridor Name

Material Volume_Property_Data_set_LDz.dyn (53.9 KB)

You can try my script. I changed it according to your needs (just shape codes and their cumulative volumes)

I have multiple corridors in my drawing. I tried to calculate the cumulative volume using @LasmaDzintare method, but it’s showing an error. Is there something I’m missing in the script?

Can you provide your dwg file with solids?

and also, try the last dyn file I attached, the previous version did not have the nodes to sum the volumes with the same shape codes

Property data.dwg (3.1 MB)

Sorry, both my scripts (the one I uploaded here for you and the one I have the last pic of, the colourful one) run fine with your DWG. Which version of Civil 3D are you working on (I’m on 2026.1)? And what packages have you installed? Mine are listed in the pic below