# How to Extrude a Curve up to a Defined Level in Revit

**URL:** <https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704>\
**Category:** Revit\
**Created:** [August 3, 2017, 10:21am UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704 "2017-08-03T10:21:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerald.mok](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@gerald.mok](https://forum.dynamobim.com/u/gerald.mok)\
**Post date:** [August 3, 2017, 10:21am UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704/1 "2017-08-03T10:21:17Z")

</div>

I have a set of pilecaps of different sizes that i moddeled.

Usually during the course of the project, i would have to find the ‘working area’ which is the amount of soil to excavate in order to actually build the pilecap. In essence this script i wrote created a Mass around the isolated footing element, but made use of the geometry of the footing to offset a certain distance. To do so , i

1. changed the element into a surface,
2. picked out the bottom surface, and offset it downwards,
3. converted that to a polyline, then offset it horizontally,
4. Extrude it back up to Level 1

Im having difficulty with step 4, which is the distance input into Curve.ExtrudeAsSolid

Any Ideas?

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/c/2cc444f005dba2680e60a0f8eed162742421e40a.JPG)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [August 3, 2017, 2:13pm UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704/2 "2017-08-03T14:13:58Z")

</div>

You have no horizontalDown surfaces. Everything is erroring out. Go back and make sure your surfaces are correct. It may be as simple as using a horizontalUp surface instead.

---

<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:** [August 3, 2017, 2:15pm UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704/3 "2017-08-03T14:15:39Z")

</div>

You are extruding nothing (game of thrones reference goes here). The error is earlier in the process as the input for the curve into the extrude as solid is null. Expand all previews and find the first error (you have a lot of yellow nodes) that is causing the issue and post another image of your graph with those exposed.

---

<div class="post-metadata">

**Author:** ![gerald.mok](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@gerald.mok](https://forum.dynamobim.com/u/gerald.mok)\
**Post date:** [August 4, 2017, 3:51am UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704/4 "2017-08-04T03:51:04Z")

</div>

Hi, just an update,

Thanks for the suggestions, i managed to get it somewhat working, right now i using a method that references the height of the element itself, thus i am able to extrude it back up to the top of the pilecap, but not exactly back up to Level 1 yet

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/1/61a57842bb12c91cd8a222221156af72668d35f0.JPG)

Ill post the other picture in another post as i am unable to upload 2 photos

---

<div class="post-metadata">

**Author:** ![gerald.mok](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@gerald.mok](https://forum.dynamobim.com/u/gerald.mok)\
**Post date:** [August 4, 2017, 3:51am UTC](https://forum.dynamobim.com/t/how-to-extrude-a-curve-up-to-a-defined-level-in-revit/13704/5 "2017-08-04T03:51:38Z")

</div>

In the next picture you can see the extrusion which goes up to the top of the pilecap, but how would i extrude them up to the level of the beam instead? any ideas

 ![Capture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/12d4e336e1bcfa59e647bf9b38b2b723a2f4e885.JPG)

Side question, this DirectShape, is there a way to turn it into a usable family in Revit itself? i realised i am unable to extract any volume from it outside of dynamo.

thanks and best regards!
