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

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?

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.

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.

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

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

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

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!