Hi @Nick_Boyts. Thanks for your kind effort in helping me. Thanks for letting me know that your background is not Civil 3D. I’ll try to explain it again since I’ve been a little blurry.
I have a corridor in Civil 3D. Like any corridor in Civil 3D, this one is made of assemblies that control the creation of “feature lines” along the alignment of the road depending on previously assigned “codes.” For instance, if a code for the Edge-Of-Pavement is set, then I’ll have a feature line along the corridor that represents it in 3D. The assemblies are inserted at a specific frequency along the alignment (every 5m, 10m, etc.). At every assembly placement, a point for every “feature line” is created if the conditions at that station are those that allow it to happen.
An important output of our design as highway engineers is the report that allows surveyors to stake out the design on the field. Therefore, we extract the coordinates from the model to create such a report.
Now, what I’m doing is getting the point coordinates of my desired feature lines at the assembly placement that is present in the Civil 3D corridor. When I get those coordinates, everything is ok until I’m working with feature lines that are not continuous along the corridor. Let’s say those that appear just at some parts of the model but not from the beginning to the end.
See the previous image. When I get the list of points, Dynamo gets all the available points, but they appear one after the other without considering the gap that is present in the middle. The gap is important because when I’m creating the report, I have to indicate in those blank spaces the reason why there is no data (In the case of the image, there is a retaining wall), and not having those empty spaces would implicate to reorganize the data on the spreadsheet. I’m trying to automate this because, even though I can have the information I need with the out-of-the-box tools that Civil gives me, I always have to reorganize it later in Excel, and this is time-consuming.
Let’s go to Dynamo:
This is my list of points; as you can see, there are just 75 points.
Every single point on that list is placed at a different station along the alignment of my road at the given frequency I was talking about previously. In this case, my frequency is 10m.
According to the frequency (and having some particular additional points I needed), there are 143 stations where I can get data, considering the length of my alignment.
These are the stations where there is data to get from my corridor (my alignment starts at the k3+950 station, that’s the first number you see there):
As you can see, there are 143 stations where the data can be extracted. If you compare the list sizes, you immediately notice that the feature line from which I got my points is not present from the beginning to the end of the alignment. That’s why I created another list to determine which station every point belonged to.
This is the list with the stations of the points from the first list:
Notice the list size again and the highlighted in blue. You can notice that there is no “hinge” feature line in this case for stations ranging from 4340 to 4390, and there is data again in 4400.
Now, what I’m trying to do, is to accommodate my points (first image) in a new list that not only will have the size of the whole available stations’ list (the second image) but also will respect the stations each point belong to. This means that when there are stations where my feature line is not present, I will fill the point for that station with a (0,0,0) or (“”,“”,“”) to create the blank space I need to see in Excel when I pour the data there. In Excel I’ll have some rows (X,Y,Z coordinates) with data and others with zeros or empty.
I have created a block with a nested “for loop” to solve this, but I haven’t been able to make it work. I’m completely new at doing this, and I could have many errors:
Lista1= The big list with all the stations available in my corridor.
Lista2= The list with the stations of my points
Lista3= The points I want to organize in a new list depending on their corresponding stations.
Lista4= The new list with my points and the (0,0,0) points at the stations where there was no data.
This was too long to explain, but I sincerely hope I made myself clear and you can understand to see if you can provide me with some insights.
Have a good day. Any help is appreciated.
Best regards!