# Dynamo - Civil 3D Feature Lines Editing

**URL:** <https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262>\
**Category:** Civil 3D\
**Tags:** geometry, dynamo\
**Created:** [April 3, 2025, 6:03pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262 "2025-04-03T18:03:21Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike.perez](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mike.perez](https://forum.dynamobim.com/u/mike.perez)\
**Post date:** [April 3, 2025, 6:03pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/1 "2025-04-03T18:03:21Z")

</div>

Hello all, I’m fairly new to Dynamo and I’m seeking help on how to create a Dynamo script. What I’m trying to achieve is for Dynamo to get all the Feature lines inside a Civil 3D file and find the slope of the feature line. Keep in mind the feature line will only have 2 points. If the slope of the feature line exceeds a certain percentage, let’s say 5%, then adjust the elevation as such so that the slope meets the requirement of 5% or less. Can someone help me or guide me on who to create this script? I do not have any python skills but willing to learn.

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [April 3, 2025, 6:11pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/2 "2025-04-03T18:11:35Z")

</div>

Hi @mike.perez,

Definitely doable. Which version of Civil 3D are you using? That will make a big difference.

---

<div class="post-metadata">

**Author:** ![mike.perez](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mike.perez](https://forum.dynamobim.com/u/mike.perez)\
**Post date:** [April 3, 2025, 6:45pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/3 "2025-04-03T18:45:12Z")

</div>

currently using civil 3D 2025

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [April 3, 2025, 7:23pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/4 "2025-04-03T19:23:31Z")

</div>

Great, that will make it easier 🙂

> [@mike.perez](#):
>
> get all the Feature lines inside a Civil 3D file

Here’s how you can do that:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/2/b2880568f4b94af2f77f7e4443ac5440a5b0204a.png)

> [@mike.perez](#):
>
> find the slope of the feature line

Add on the `FeatureLine.GradeAtStation` node. Station 0 will be at the start of the feature line. Since all of your feature lines only have a single segment (i.e., two points max), then it doesn’t really matter what station value you use as long as it is in the range of `0 <= station <= feature line length`.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/0/c0106736637cd1acfebe5b110958d5a419c3800e.png)

> [@mike.perez](#):
>
> If the slope of the feature line exceeds a certain percentage, let’s say 5%,

Another way to say this is that you want to filter out the feature lines with `grade > 5%`. You’ll have to decide if this is “grade ahead” or “grade back”, depending on how your feature lines are set up. The way to filter them is to use the `List.FilterByBoolMask` node.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/c/0c5331cf4ade1fcc914db858412368cf1c46f30d.png)

> [@mike.perez](#):
>
> then adjust the elevation as such so that the slope meets the requirement of 5% or less

Now you have two buckets: the feature lines with grade \> 5% (the `in` list), and all the others (the `out` list). Adjusting the grade is a little more work, but nothing crazy. What you need to do is calculate what the elevation of the end point should be, then set the point elevation to that value.

 ![set_grade](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/c/1c6cff2a9494d7fb4d0b7efb3b1b9086c849c08f.png)

Full graph here for reference:  
[AdjustFeatureLineGrade.dyn](https://forum.dynamobim.com/uploads/short-url/n0H6KhtDY9kIwjkHyDvMHIhwSrH.dyn) (33.1 KB)

---

<div class="post-metadata">

**Author:** ![mike.perez](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mike.perez](https://forum.dynamobim.com/u/mike.perez)\
**Post date:** [April 3, 2025, 8:45pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/5 "2025-04-03T20:45:17Z")

</div>

This worked great Zachri. Exactly what I wanted to do. How would I add a selection function at the beginning to select multiple feature lines?

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [April 3, 2025, 8:48pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/6 "2025-04-03T20:48:52Z")

</div>

There is a node called `Select Objects` that you can use.

---

<div class="post-metadata">

**Author:** ![mike.perez](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mike.perez](https://forum.dynamobim.com/u/mike.perez)\
**Post date:** [April 3, 2025, 9:40pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/7 "2025-04-03T21:40:25Z")

</div>

What would I need to replace the input with to make the 5% slope max a variable. So, if I wanted to make the max be 10% slope or say 8% slope.

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [April 3, 2025, 9:59pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/8 "2025-04-03T21:59:11Z")

</div>

Right here. You can type it whatever you like.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/7/9748e9a9d819d3e67706ef43467845e70337cb2c.png)

---

<div class="post-metadata">

**Author:** ![mike.perez](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mike.perez](https://forum.dynamobim.com/u/mike.perez)\
**Post date:** [April 7, 2025, 5:01pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/9 "2025-04-07T17:01:23Z")

</div>

Is there a simple way to use Excel to import data to edit feature lines? I’m able to build a script to bring the data from excel but how do I apply it to the feature lines that currently exist in the drawing? I guess a better question should be, Can I add an IF statement to this script that you created for me to say that if grade out is more than 10%, bring it down to 10% if not then leave it alone.

I did this in excel by exporting the data and then manipulating it there.

---

<div class="post-metadata">

**Author:** ![zachri.jensen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/zachri.jensen/32/205331_2.png) [@zachri.jensen](https://forum.dynamobim.com/u/zachri.jensen)\
**Post date:** [April 7, 2025, 6:03pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/10 "2025-04-07T18:03:23Z")

</div>

Generally yes, you can import whatever data you need from Excel. A couple of nodes you can try:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/1/c1e540886477bf833c9733ff2c7614a2af1e5843.png)

> [@mike.perez](#):
>
> Can I add an IF statement to this script that you created for me to say that if grade out is more than 10%, bring it down to 10% if not then leave it alone.

That should already be covered by this above:

> [@zachri.jensen](#):
>
> Another way to say this is that you want to filter out the feature lines with `grade > 5%`. You’ll have to decide if this is “grade ahead” or “grade back”, depending on how your feature lines are set up. The way to filter them is to use the `List.FilterByBoolMask` node.

---

<div class="post-metadata">

**Author:** ![rrendon](https://avatars.discourse-cdn.com/v4/letter/r/49beb7/32.png) [@rrendon](https://forum.dynamobim.com/u/rrendon)\
**Post date:** [January 22, 2026, 6:00am UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/11 "2026-01-22T06:00:04Z")

</div>

Zachri,

What if the featureline has 4 points, and one of them (index 0 or 3 the intersection with another fearureline) has the starting elevation I want to use, but I do not know the direction of the featureline? How can I determine the station or index?

---

<div class="post-metadata">

**Author:** ![rymen\_kyro](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@rymen\_kyro](https://forum.dynamobim.com/u/rymen_kyro)\
**Post date:** [January 31, 2026, 12:49pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/12 "2026-01-31T12:49:35Z")

</div>

Hi. I’m new to Dynamo. I can’t find most of the nodes that you guys are using. What packages should I download. I’m using C3D 2025, installed civil 3d toolkit, and camber packages already. Still can’t find some nodes like Featureline.SetPointElevation

---

<div class="post-metadata">

**Author:** ![pedro.sam.machado](https://avatars.discourse-cdn.com/v4/letter/p/839c29/32.png) [@pedro.sam.machado](https://forum.dynamobim.com/u/pedro.sam.machado)\
**Post date:** [February 2, 2026, 11:52am UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/13 "2026-02-02T11:52:20Z")

</div>

Hello, @rymen_kyro! I don’t think they used any packeges, those are all native nodes. For example, Featureline.SetPointElevation, you can find at Civil 3D, Sites, Feature Line. What version of dynamo are you using?

---

<div class="post-metadata">

**Author:** ![rymen\_kyro](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@rymen\_kyro](https://forum.dynamobim.com/u/rymen_kyro)\
**Post date:** [February 3, 2026, 8:42am UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/14 "2026-02-03T08:42:26Z")

</div>

I am using Dynamo Civil 3D 3.0.0.145

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [February 3, 2026, 9:44am UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/15 "2026-02-03T09:44:43Z")

</div>

> [@rymen\_kyro](#):
>
> Dynamo Civil 3D 3.0.0.145

Sounds like you need to update Civil 3D - you appear to be on 2025.0, you should be on 2025.2.4. This will update Dynamo to give a bunch of new nodes, and patch two known vulnerabilities in the core 2025.0 release.

---

<div class="post-metadata">

**Author:** ![rymen\_kyro](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@rymen\_kyro](https://forum.dynamobim.com/u/rymen_kyro)\
**Post date:** [February 3, 2026, 12:52pm UTC](https://forum.dynamobim.com/t/dynamo-civil-3d-feature-lines-editing/109262/16 "2026-02-03T12:52:07Z")

</div>

Thanks. I can see the nodes now.
