# Multiple corridor creation using dynamo

**URL:** <https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720>\
**Category:** Civil 3D\
**Created:** [December 27, 2020, 6:24pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720 "2020-12-27T18:24:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ernest.Villanueva](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@Ernest.Villanueva](https://forum.dynamobim.com/u/Ernest.Villanueva)\
**Post date:** [December 27, 2020, 6:24pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/1 "2020-12-27T18:24:47Z")

</div>

Hello,

I am currently working on a site development which consist of more than 40 roads. We have just migrated to civil3d2021 and i am fascinated about using Dynamo especially for redundant task.

Normally our process are;

1. Create existing ground surface file using survey data
2. Create Data shortcut for the existing ground
3. Data reference the existing ground and create the alignment, profile-views and design profiles in a separate file.
4. Create Data shortcut for the alignment/profile.
5. Create a file where we data-shortcut all the data required.
6. Create corridor and surface (In step 6 we normally create separate corridors to each alignment due to file size and sometimes we divided the site and create multiple corridor files).

This is a tedious job and we spent several weeks to finish. Now, we were awarded a site which may consist of more than 200 alignments. However, the timeline is very tight which could also take effect in our ongoing projects.

I am hoping somebody could assist me on how to reduce our process especially step 3 and 6 that would be a HUGE help for us.

Regards,  
Ernest

---

<div class="post-metadata">

**Author:** ![Daan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daan/32/82246_2.png) [@Daan](https://forum.dynamobim.com/u/Daan)\
**Post date:** [December 27, 2020, 7:51pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/2 "2020-12-27T19:51:01Z")

</div>

Hi @Ernest.Villanueva,

I have not tried something like this, but the Civil3DToolkit Package has a lot of nodes which will probably help you out a lot!

---

<div class="post-metadata">

**Author:** ![Mahmutjan](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@Mahmutjan](https://forum.dynamobim.com/u/Mahmutjan)\
**Post date:** [December 27, 2020, 8:02pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/3 "2020-12-27T20:02:43Z")

</div>

Very good question, I would like to know the answer as well, I have same situation as well.  
Thx.

---

<div class="post-metadata">

**Author:** ![shahid.shaikh\_C3D](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@shahid.shaikh\_C3D](https://forum.dynamobim.com/u/shahid.shaikh_C3D)\
**Post date:** [December 28, 2020, 9:17am UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/4 "2020-12-28T09:17:42Z")

</div>

Hi @Ernest.Villanueva,

Not an expert but i can suggest a way for step 3.

If you have polylines for all your alignment then you can create a graph and convert all polylines in to alignment just in a click. Had recently tested creating alignment from polyline and it worked for a group of selection.

on the same concept if you can create profile views too.

For design profile you need elevations and stations. if you have that then you can create design profile too.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![Ernest.Villanueva](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@Ernest.Villanueva](https://forum.dynamobim.com/u/Ernest.Villanueva)\
**Post date:** [January 5, 2021, 7:52am UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/5 "2021-01-05T07:52:07Z")

</div>

Hello again, is there any script to create a corridor from a file which have all the alignments and profiles?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 5, 2021, 4:43pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/6 "2021-01-05T16:43:42Z")

</div>

Hi @Ernest.Villanueva,

There are a lot of steps involved in this post, so I will make some other posts separately to split this up. I’ll post the links below.

> [@Ernest.Villanueva](#):
>
> Create Data shortcut for the existing ground

This is not currently possible because there are no public methods exposed in the Civil 3D API for working with data shortcuts. The same answer applies to steps 4 and 5.

> [@Ernest.Villanueva](#):
>
> Create corridor and surface

Here is an example I put together for you that shows how to create multiple corridors in a single file. I used an Excel file to drive some of the inputs, but that approach is just for illustrative purposes. Creating the corridors and settings various parameters can be done a combination of OOTB nodes and the Civil 3D Toolkit package, but creating the surfaces requires a Python solution at the moment. The code I wrote will (1) add a surface to each corridor, (2) add whichever links you want (I just used the Top links), and (3) add the corridor extents as a boundary. Here is the dataset - hope it helps!

[CreateCorridors.dwg](https://forum.dynamobim.com/uploads/short-url/kYSkxXxk1Mz27MUbkGw6LOt8pQs.dwg) (981.0 KB)  
[CreateCorridors.dyn](https://forum.dynamobim.com/uploads/short-url/pv2sT58EJH7BKVP3DIH0ZmRvOHk.dyn) (89.7 KB)  
[MultipleCorridors.xlsx](https://forum.dynamobim.com/uploads/short-url/8gpk5mQddmogxMjlbEEdfWQAZEL.xlsx) (8.8 KB)

![CreateCorridors](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2f3bb2a6db02452e15d843da39fbd0ffc5c6c3ea.gif)

---

<div class="post-metadata">

**Author:** ![Drbohlav](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/drbohlav/32/113004_2.png) [@Drbohlav](https://forum.dynamobim.com/u/Drbohlav)\
**Post date:** [January 5, 2021, 4:47pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/7 "2021-01-05T16:47:55Z")

</div>

Hello, I have this question on corridor surfaces and boundary. [Civil 3D Toolkit Feedback thread - #719 by Drbohlav](https://forum.dynamobim.com/t/civil-3d-toolkit-feedback-thread/43570/719) Do you know about any solution or have any tip?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 5, 2021, 4:53pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/8 "2021-01-05T16:53:57Z")

</div>

> [@Ernest.Villanueva](#):
>
> create the alignment

@Ernest.Villanueva - see this post:

> [@Create Multiple Alignments From Polylines](https://forum.dynamobim.com/t/create-multiple-alignments-from-polylines/58960):
>
> For @Ernest.Villanueva - see original post here: Here’s an example of creating multiple alignments from polylines. This will require the Civil 3D Toolkit package. [CreateAlignments.dwg](https://forum.dynamobim.com/uploads/short-url/vJtStz9bplghm9OQUTdE2yneVSs.dwg) (401.6 KB) [CreateAlignments.dyn](https://forum.dynamobim.com/uploads/short-url/g1S1LyUsIj2jfSTjuIeDafmpVlb.dyn) (46.3 KB) [MultipleCorridors.xlsx](https://forum.dynamobim.com/uploads/short-url/8gpk5mQddmogxMjlbEEdfWQAZEL.xlsx) (8.8 KB)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 5, 2021, 5:03pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/9 "2021-01-05T17:03:04Z")

</div>

@Ernest.Villanueva see post here for creating EG surface profiles:

> [@Create Surface Profiles for Multiple Alignments](https://forum.dynamobim.com/t/create-multiple-surface-profiles/58962):
>
> For @Ernest.Villanueva. See original post here: Here’s an example of creating surface profiles for multiple alignments. This will require the Civil 3D Toolkit package. [CreateSurfaceProfiles.dwg](https://forum.dynamobim.com/uploads/short-url/cznok4s1cAqDjFvUi8LvoFfJEfO.dwg) (802.4 KB) [CreateSurfaceProfiles.dyn](https://forum.dynamobim.com/uploads/short-url/1bM2aZu9YX9vWO9Ms9enPIvOVob.dyn) (39.9 KB) [MultipleCorridors.xlsx](https://forum.dynamobim.com/uploads/short-url/8gpk5mQddmogxMjlbEEdfWQAZEL.xlsx) (8.8 KB) [CreateSurfaceProfiles]

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 5, 2021, 5:19pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/10 "2021-01-05T17:19:23Z")

</div>

> [@Drbohlav](#):
>
> Hello, I have this question on corridor surfaces and boundary.

Can you open a new post?

---

<div class="post-metadata">

**Author:** ![Drbohlav](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/drbohlav/32/113004_2.png) [@Drbohlav](https://forum.dynamobim.com/u/Drbohlav)\
**Post date:** [January 5, 2021, 5:25pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/11 "2021-01-05T17:25:53Z")

</div>

Here is new post [Add boundary to corridor surface](https://forum.dynamobim.com/t/add-boundary-to-corridor-surface/58964)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 6, 2021, 3:15am UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/12 "2021-01-06T03:15:59Z")

</div>

> [@Ernest.Villanueva](#):
>
> profile-views

@Ernest.Villanueva - see this post.

> [@Create Profile Views for Multiple Alignments](https://forum.dynamobim.com/t/create-profile-views-for-multiple-alignments/58984):
>
> For @Ernest.Villanueva. See original post here. Attached is an example for creating profile views for multiple alignments. There is some Python code to prompt the user for an insertion point, and then options for changing the number of rows, number of columns, and spacing between each, as well as if the views are arranged from bottom-to-top or top-to-bottom. Note that the Civil 3D Toolkit package is required. [CreateProfileViews.dwg](https://forum.dynamobim.com/uploads/short-url/xLBrcgtSrBYK91tUlqTkGFMYMyw.dwg) (786.9 KB) [CreateProfileViews.dyn](https://forum.dynamobim.com/uploads/short-url/h8CWHK09xUpAn6gtm7eHikpUoYw.dyn) (70.6 KB) [MultipleCorrid…](https://forum.dynamobim.com/uploads/short-url/8gpk5mQddmogxMjlbEEdfWQAZEL.xlsx)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 6, 2021, 3:34am UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/13 "2021-01-06T03:34:14Z")

</div>

> [@Ernest.Villanueva](#):
>
> design profiles

@Ernest.Villanueva - see this post:

> [@Create Design Profiles for Multiple Alignments](https://forum.dynamobim.com/t/create-design-profiles-for-multiple-alignments/58985):
>
> For @Ernest.Villanueva. See original post here. Here is an example of creating design profiles for multiple alignments. It will create a simple profile that matches the EG elevations at the start and end of the alignment, i.e. this is not a script for optimizing a vertical profile. It just reduces the effort of creating several profiles and requires manual modification afterwards to add PVIs, vertical curves, etc. as appropriate. Note that this will require the Civil 3D Toolkit package. [Crea…](https://forum.dynamobim.com/uploads/short-url/rUFBo2qc1lmloLf1u1Pvt9o2eQ9.dwg)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [January 6, 2021, 4:31pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/14 "2021-01-06T16:31:17Z")

</div>

> [@Ernest.Villanueva](#):
>
> Create existing ground surface file using survey data

@Ernest.Villanueva - see this post:

> [@Create TIN Surface From Survey Data](https://forum.dynamobim.com/t/create-tin-surface-from-survey-data/59017):
>
> For @Ernest.Villanueva. See original post here: Here’s an example of creating a TIN surface from a CSV file of ground survey points. Note that all of the points in the dataset are ground points, so there is no step of filtering out non-ground points. If that is the case, the filtering could be done in Dynamo, or it could be done using selections/queries to separate the points into different point groups (I think this is easier and better for documentation). Then just feed the point group name…

---

<div class="post-metadata">

**Author:** ![Ernest.Villanueva](https://avatars.discourse-cdn.com/v4/letter/e/b3f665/32.png) [@Ernest.Villanueva](https://forum.dynamobim.com/u/Ernest.Villanueva)\
**Post date:** [January 11, 2021, 5:39am UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/17 "2021-01-11T05:39:28Z")

</div>

Thank you so much on sharing some of the dynamo scripts. i tried running it in my work and it works! i made some iteration on targeting the surface and it works perfectly. the only thing i need to create are the intersections.

Once again thank you for your support!

 ![create corridor](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/8/3888baab974cd114655ec624757ee6fd0c50ec46.jpeg)

---

<div class="post-metadata">

**Author:** ![jameshitt](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jameshitt](https://forum.dynamobim.com/u/jameshitt)\
**Post date:** [February 20, 2021, 7:36pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/18 "2021-02-20T19:36:55Z")

</div>

Silly question, but can you tell me how you get that “name” variable input onto that code block?

 ![Code Block Question](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/9/79dba64f90b6249f578a565c9e0e13fb1f652e9d.jpeg)

---

<div class="post-metadata">

**Author:** ![jameshitt](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jameshitt](https://forum.dynamobim.com/u/jameshitt)\
**Post date:** [February 20, 2021, 7:45pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/19 "2021-02-20T19:45:42Z")

</div>

Never mind, I believe I found what I was missing in the Primer. Thanks!

---

<div class="post-metadata">

**Author:** ![jameshitt](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jameshitt](https://forum.dynamobim.com/u/jameshitt)\
**Post date:** [February 21, 2021, 3:26pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/20 "2021-02-21T15:26:02Z")

</div>

I was also wondering about these to nodes:

 ![Code Block Question2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/0/603920565598ae51304ce9fe6b6584621c49a22b.jpeg)  
Are the Object.Identity nodes basically just allowing you to make a cleaner-looking diagram (very clever idea btw)? Or is there something else more subtle that I’m missing?  
And are the [passThrough,waitFor][0]; code blocks (I guess that is DesignScript?) there to keep the operations all executing in the correct sequence?

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [February 21, 2021, 5:03pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/21 "2021-02-21T17:03:14Z")

</div>

> [@jameshitt](#):
>
> Are the Object.Identity nodes basically just allowing you to make a cleaner-looking diagram

Yep!

> [@jameshitt](#):
>
> And are the [passThrough,waitFor][0]; code blocks (I guess that is DesignScript?) there to keep the operations all executing in the correct sequence?

And yep again!

> [@Passthrough, how can i understand that?](https://forum.dynamobim.com/t/passthrough-how-can-i-understand-that/50646/6):
>
> It is simply just creating a list and then getting the first item in the list. So it could be rewritten as: List.FirstItem(passthrough,waitfor); Or you could even simplify it further and just do a code block with: [a,b][0]; It acts as a gate because Dynamo has to “collect” all of the items in the list before passing the contents on to the next node.

---

<div class="post-metadata">

**Author:** ![jameshitt](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jameshitt](https://forum.dynamobim.com/u/jameshitt)\
**Post date:** [February 21, 2021, 5:43pm UTC](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720/22 "2021-02-21T17:43:21Z")

</div>

This is a great code to parse through.  
For the Python portion (creating the corridor surface), I see you use Links to create the surface. I would like to make the surfaces using feature lines instead.

In your code, is “links” just the name for a list of string inputs which are the code for the Top Links? (In this case, just “Top”.) If so, then I should be able to swap in its place a list of codes for multiple feature lines instead…?

Of course I’ll have to switch “surf.AddLinkCode(link, True)” with “surf.AddFeatureLineCode(featureLineName)”  
Then, can I presume that “featureLineName” would be referring to the 3rd user input, in this case a set of strings, something like [“Top\_curb”,“Back\_curb”,“Crown”]?

[Next page](https://forum.dynamobim.com/t/multiple-corridor-creation-using-dynamo/58720.md?page=2)
