# DesignScript If-statement not working when trying to convert ModelCurves/Grids into Dynamo Lines

**URL:** <https://forum.dynamobim.com/t/designscript-if-statement-not-working-when-trying-to-convert-modelcurves-grids-into-dynamo-lines/99962>\
**Category:** DesignScript\
**Tags:** revit\
**Created:** [April 11, 2024, 8:27pm UTC](https://forum.dynamobim.com/t/designscript-if-statement-not-working-when-trying-to-convert-modelcurves-grids-into-dynamo-lines/99962 "2024-04-11T20:27:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [April 12, 2024, 8:59pm UTC](https://forum.dynamobim.com/t/designscript-if-statement-not-working-when-trying-to-convert-modelcurves-grids-into-dynamo-lines/99962/6 "2024-04-12T20:59:30Z")

</div>

The problem is that `Element.Geometry` returns a list. Just use an If statement with `CurveElement.Curve` instead of `Element.Geometry`.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/7/57f78e234b07ff9a7bcbec540ac52f631ce22ad5.png)

---

_[View the full topic](https://forum.dynamobim.com/t/designscript-if-statement-not-working-when-trying-to-convert-modelcurves-grids-into-dynamo-lines/99962)._
