<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Creating parallel line in arcmap using modelbuilder? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/creating-parallel-line-in-arcmap-using/m-p/1178197#M26348</link>
    <description>&lt;P&gt;i need help model builder to duplicate feature parallel with specified distance&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a script in arcpy but i can not run coz i did not understand the code :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy, math
infc=r'..\SCRARCH\clone.shp'

def CopyParallel(plyP,sLength):
    part=plyP.getPart(0)
    lArray=arcpy.Array();rArray=arcpy.Array()
    for ptX in part:
        dL=plyP.measureOnLine(ptX)
        ptX0=plyP.positionAlongLine (dL-0.01).firstPoint
        ptX1=plyP.positionAlongLine (dL+0.01).firstPoint
        dX=float(ptX1.X)-float(ptX0.X)
        dY=float(ptX1.Y)-float(ptX0.Y)
        lenV=math.hypot(dX,dY)
        sX=-dY*sLength/lenV;sY=dX*sLength/lenV
        leftP=arcpy.Point(ptX.X+sX,ptX.Y+sY)
        lArray.add(leftP)
        rightP=arcpy.Point(ptX.X-sX, ptX.Y-sY)
        rArray.add(rightP)
    array = arcpy.Array([lArray, rArray])
    section=arcpy.Polyline(array)
    return section


with arcpy.da.UpdateCursor(infc,("Shape@","Width")) as cursor:
    for shp,w in cursor:
        twoLines=CopyParallel(shp,w)
        cursor.updateRow((twoLines,w))&lt;/LI-CODE&gt;</description>
    <pubDate>Sun, 29 May 2022 13:05:20 GMT</pubDate>
    <dc:creator>MahmoudHegazy</dc:creator>
    <dc:date>2022-05-29T13:05:20Z</dc:date>
    <item>
      <title>Creating parallel line in arcmap using modelbuilder?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/creating-parallel-line-in-arcmap-using/m-p/1178197#M26348</link>
      <description>&lt;P&gt;i need help model builder to duplicate feature parallel with specified distance&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a script in arcpy but i can not run coz i did not understand the code :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy, math
infc=r'..\SCRARCH\clone.shp'

def CopyParallel(plyP,sLength):
    part=plyP.getPart(0)
    lArray=arcpy.Array();rArray=arcpy.Array()
    for ptX in part:
        dL=plyP.measureOnLine(ptX)
        ptX0=plyP.positionAlongLine (dL-0.01).firstPoint
        ptX1=plyP.positionAlongLine (dL+0.01).firstPoint
        dX=float(ptX1.X)-float(ptX0.X)
        dY=float(ptX1.Y)-float(ptX0.Y)
        lenV=math.hypot(dX,dY)
        sX=-dY*sLength/lenV;sY=dX*sLength/lenV
        leftP=arcpy.Point(ptX.X+sX,ptX.Y+sY)
        lArray.add(leftP)
        rightP=arcpy.Point(ptX.X-sX, ptX.Y-sY)
        rArray.add(rightP)
    array = arcpy.Array([lArray, rArray])
    section=arcpy.Polyline(array)
    return section


with arcpy.da.UpdateCursor(infc,("Shape@","Width")) as cursor:
    for shp,w in cursor:
        twoLines=CopyParallel(shp,w)
        cursor.updateRow((twoLines,w))&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 29 May 2022 13:05:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/creating-parallel-line-in-arcmap-using/m-p/1178197#M26348</guid>
      <dc:creator>MahmoudHegazy</dc:creator>
      <dc:date>2022-05-29T13:05:20Z</dc:date>
    </item>
  </channel>
</rss>

