# Polycurve workflow issue

**URL:** <https://forum.dynamobim.com/t/polycurve-workflow-issue/31946>\
**Category:** Geometry\
**Tags:** revit, dynamostudio, geometry, dynamo\
**Created:** [February 11, 2019, 11:41am UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946 "2019-02-11T11:41:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aperez\_SACO](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@aperez\_SACO](https://forum.dynamobim.com/u/aperez_SACO)\
**Post date:** [February 11, 2019, 11:41am UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/1 "2019-02-11T11:41:10Z")

</div>

Hi there,

I have been working on a code that works with some curves, joining them into polycurves and working with these polycurves afterwards. This workflow was fully working on DynamoStudio, but when I try to do the exact same thing in Dynamo SandBox or Dynamo/Revit I am finding the following issue:

- Polycurve is joined correctly with no errors, but when I want to reverse that polycurve or find the closest point from the polycurve to a point, the program deprecates all the curves composing the polycurve but one.  

- I have tried using other nodes, such as Nurbs but (of course) the curve I get is not the original one I had

- I have also tried converting the original nurbs curves into lines, but that doesn’t make any change to the final result.

- I have also tried modifying the lacings, levels,… But that is not the case either

I will be really grateful if anyone can give me some light on this.

---

<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 11, 2019, 1:57pm UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/2 "2019-02-11T13:57:38Z")

</div>

Please share the dyn needed to reproduce the issue.

Note that there are three segments in the first curve as it was fed three lines.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [February 11, 2019, 3:28pm UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/3 "2019-02-11T15:28:36Z")

</div>

Hi @aperez_SACO

> [@aperez\_SACO](#):
>
> but when I want to reverse that polycurve or find the closest point from the polycurve to a point, the program deprecates all the curves composing the polycurve but one.

Try doing Curve.Reverse before Polycurve.ByJoinedCurves.

---

<div class="post-metadata">

**Author:** ![aperez\_SACO](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@aperez\_SACO](https://forum.dynamobim.com/u/aperez_SACO)\
**Post date:** [February 11, 2019, 4:12pm UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/4 "2019-02-11T16:12:19Z")

</div>

This works for the reverse operation but is no longer useful for example for Geometry.DistanceTo or Geometry.ClosestPointTo

---

<div class="post-metadata">

**Author:** ![aperez\_SACO](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@aperez\_SACO](https://forum.dynamobim.com/u/aperez_SACO)\
**Post date:** [February 11, 2019, 4:16pm UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/5 "2019-02-11T16:16:13Z")

</div>

I can’t really share the file, sorry. Yes, the three segments that compose the polycurve are the ones that I have joined to create it. Usually in Dynamo Studio there is no issue with that, but in this case I really don’t understand why, whenever I try to work with those polylines it deprecates part of it

---

<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 11, 2019, 6:05pm UTC](https://forum.dynamobim.com/t/polycurve-workflow-issue/31946/6 "2019-02-11T18:05:48Z")

</div>

> [@aperez\_SACO](#):
>
> I can’t really share the file

Personally, I can’t really help without seeing how you got here. I had a few thoughts as to ‘why’ it’s happening (inline points, geometry working ranges), but none of them panned out in my examples. Since I can’t recreate the issue I’m unable to help. ☹

Removing all but one of the failing polylines from the file should remove any concerns you have with sharing, and should allow us to see where the issue is.
