# Dynamo, How do I keep the Z coordinates while I convert lines into curves

**URL:** <https://forum.dynamobim.com/t/dynamo-how-do-i-keep-the-z-coordinates-while-i-convert-lines-into-curves/91282>\
**Category:** Revit\
**Tags:** revit, geometry, dynamo\
**Created:** [June 29, 2023, 2:20pm UTC](https://forum.dynamobim.com/t/dynamo-how-do-i-keep-the-z-coordinates-while-i-convert-lines-into-curves/91282 "2023-06-29T14:20:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zaiyri](https://avatars.discourse-cdn.com/v4/letter/z/90ced4/32.png) [@Zaiyri](https://forum.dynamobim.com/u/Zaiyri)\
**Post date:** [June 29, 2023, 2:20pm UTC](https://forum.dynamobim.com/t/dynamo-how-do-i-keep-the-z-coordinates-while-i-convert-lines-into-curves/91282/1 "2023-06-29T14:20:13Z")

</div>

Hi,

I just noticed that I lost the Z coordinates when I convert my lines into curves to get some polycurves. My lines comes from a CADlayers without Z coordinates. I did a python script to associate my Z coordinates to the lines. This coordinates comes from an Excel File.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/f/8f2783c083800dc3ac01d6478cb7e38e002df34d.png)

So what I want is the polycurves with Z coordinates to generate some solids one under the other

Thanks for your help,

---

<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:** [June 29, 2023, 3:53pm UTC](https://forum.dynamobim.com/t/dynamo-how-do-i-keep-the-z-coordinates-while-i-convert-lines-into-curves/91282/2 "2023-06-29T15:53:16Z")

</div>

If all of the curves are plant, why pull them to the global XY plane (thereby making all the Z values 0)?

Likely the fox is to use a Curve.PullOntoPlane to get the curves to the correct elevation rather than the Python you’re currently using, but we can’t tell without a data set and a peak at the code.
