<?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 XY to Line attributes in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002593#M34379</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using the basic XY to line (data management) tool's syntax and am attempting to retain the input attribute fields, which is listed as a parameter of the tool, but I receive the following type error when trying to do so:&lt;/P&gt;&lt;P&gt;"XYToLine() takes from 0 to 9 positional arguments but 10 were given"&lt;/P&gt;&lt;P&gt;In the xy to line tool documentation (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/xy-to-line.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/data-management/xy-to-line.htm&lt;/A&gt;) the attribute parameter is the 10th argument (optional).&amp;nbsp; Please see my syntax below for reference, w/ the attribute syntax underlined for emphasis.&lt;/P&gt;&lt;P&gt;arcpy.management.XYToLine("Join4_SortiesOutput", r"C:\Users\bisho\Box Sync\ALOFT\LegacyALOFT\Symbology_Layers\ALOFT_MCWL1_Data_Results.gdb\ALOFT_MCWL1_Data_Results.gdb\Results\GPD_SortieLnPro1", "FROM_X", "FROM_Y", "TO_X", "To_Y", "GEODESIC", None, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision","&lt;U&gt;True&lt;/U&gt;")&lt;/P&gt;&lt;P&gt;The tool works w/o the attribute parameter included. The built in xy to line tool does not have the option to keep attributes.&amp;nbsp; Any suggestions of how to get the tool working w/ this functionality?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Penelope&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2020 17:04:13 GMT</pubDate>
    <dc:creator>PenelopeMitchell</dc:creator>
    <dc:date>2020-11-18T17:04:13Z</dc:date>
    <item>
      <title>XY to Line attributes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002593#M34379</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using the basic XY to line (data management) tool's syntax and am attempting to retain the input attribute fields, which is listed as a parameter of the tool, but I receive the following type error when trying to do so:&lt;/P&gt;&lt;P&gt;"XYToLine() takes from 0 to 9 positional arguments but 10 were given"&lt;/P&gt;&lt;P&gt;In the xy to line tool documentation (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/xy-to-line.htm" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/data-management/xy-to-line.htm&lt;/A&gt;) the attribute parameter is the 10th argument (optional).&amp;nbsp; Please see my syntax below for reference, w/ the attribute syntax underlined for emphasis.&lt;/P&gt;&lt;P&gt;arcpy.management.XYToLine("Join4_SortiesOutput", r"C:\Users\bisho\Box Sync\ALOFT\LegacyALOFT\Symbology_Layers\ALOFT_MCWL1_Data_Results.gdb\ALOFT_MCWL1_Data_Results.gdb\Results\GPD_SortieLnPro1", "FROM_X", "FROM_Y", "TO_X", "To_Y", "GEODESIC", None, "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision","&lt;U&gt;True&lt;/U&gt;")&lt;/P&gt;&lt;P&gt;The tool works w/o the attribute parameter included. The built in xy to line tool does not have the option to keep attributes.&amp;nbsp; Any suggestions of how to get the tool working w/ this functionality?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Penelope&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 17:04:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002593#M34379</guid>
      <dc:creator>PenelopeMitchell</dc:creator>
      <dc:date>2020-11-18T17:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: XY to Line attributes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002623#M34381</link>
      <description>&lt;P&gt;What version of ArcGIS Pro do you have installed?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At version 2.6 that new parameter was added.&amp;nbsp; See the toolbox history:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/data-management-toolbox-history-pro.htm" target="_blank"&gt;Data Management toolbox history&amp;amp;mdash;ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KoryKramer_0-1605723577591.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/472iB3E67F4A3FAA8FF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KoryKramer_0-1605723577591.png" alt="KoryKramer_0-1605723577591.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you are following the 2.6 documentation, you'll see it described there.&amp;nbsp; But if you do not have 2.6 installed, that is likely the cause of the error.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:20:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002623#M34381</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2020-11-18T18:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: XY to Line attributes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002631#M34384</link>
      <description>&lt;P&gt;&lt;SPAN&gt;r"C:\Users\bisho\Box Sync\ALOFT\LegacyALOFT\Symbology_Layers\ALOFT_MCWL1_Data_Results.gdb\ALOFT_MCWL1_Data_Results.gdb\Results\GPD_SortieLnPro1"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;you have a gdb within a gdb?&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;out_fc = r"C:\Users\bisho\BoxSync\ALOFT\LegacyALOFT\Symbology_Layers\ALOFT_MCWL1_Data_Results.gdb\ALOFT_MCWL1_Data_Results.gdb\Results\GPD_SortieLnPro1"
SR = "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision"


arcpy.management.XYToLine("Join4_SortiesOutput", out_fc, "FROM_X", "FROM_Y", "TO_X", "To_Y", "GEODESIC", spatial_reference=SR, attributes="ATTRIBUTES")	  &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try splitting out your parameters to make it readable, at least for testing.&amp;nbsp; You can use named parameters for the last two and skip any that you are using defaults for (ie, your None)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002631#M34384</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-11-18T18:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: XY to Line attributes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002662#M34391</link>
      <description>&lt;P&gt;Ah, thank you! That is the problem.&amp;nbsp; I am using version 2.5.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:17:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002662#M34391</guid>
      <dc:creator>PenelopeMitchell</dc:creator>
      <dc:date>2020-11-18T19:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: XY to Line attributes</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002668#M34394</link>
      <description>&lt;P&gt;Glad that helped.&amp;nbsp; Could you mark the reply as the accepted solution to help others?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 19:30:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/xy-to-line-attributes/m-p/1002668#M34394</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2020-11-18T19:30:36Z</dc:date>
    </item>
  </channel>
</rss>

