<?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 Copy Python Command Incorrectly Populates Parameters in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/copy-python-command-incorrectly-populates/m-p/1554154#M89679</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I created a fishnet in ArcGIS Pro using the parameters shown in Screenshot 1. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-31 124702.png" style="width: 331px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118544i0415B43AFEC00405/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-10-31 124702.png" alt="Screenshot 2024-10-31 124702.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to convert the operation to a Python script using the "Copy Python Command" tool, it generates the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.CreateFishnet(
    out_feature_class=r"Path_to_Fishnet",
    origin_coord=0,
    y_axis_coord=1,
    cell_width=1,
    cell_height=1,
    number_rows=10,
    number_columns=15,
    corner_coord=None,
    labels="LABELS",
    template="DEFAULT",
    geometry_type="POLYLINE"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, this command does not work and results in the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Create Fishnet). Parameters are not valid.
ERROR 000628: Cannot set input into parameter origin_coord.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please look into this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;version is ArcGIS Pro 3.3.2&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2024 11:54:01 GMT</pubDate>
    <dc:creator>simskr</dc:creator>
    <dc:date>2024-10-31T11:54:01Z</dc:date>
    <item>
      <title>Copy Python Command Incorrectly Populates Parameters</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-python-command-incorrectly-populates/m-p/1554154#M89679</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I created a fishnet in ArcGIS Pro using the parameters shown in Screenshot 1. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-10-31 124702.png" style="width: 331px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118544i0415B43AFEC00405/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-10-31 124702.png" alt="Screenshot 2024-10-31 124702.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I try to convert the operation to a Python script using the "Copy Python Command" tool, it generates the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.CreateFishnet(
    out_feature_class=r"Path_to_Fishnet",
    origin_coord=0,
    y_axis_coord=1,
    cell_width=1,
    cell_height=1,
    number_rows=10,
    number_columns=15,
    corner_coord=None,
    labels="LABELS",
    template="DEFAULT",
    geometry_type="POLYLINE"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, this command does not work and results in the following error:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcgisscripting.ExecuteError: ERROR 000622: Failed to execute (Create Fishnet). Parameters are not valid.
ERROR 000628: Cannot set input into parameter origin_coord.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you please look into this issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;version is ArcGIS Pro 3.3.2&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 11:54:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-python-command-incorrectly-populates/m-p/1554154#M89679</guid>
      <dc:creator>simskr</dc:creator>
      <dc:date>2024-10-31T11:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Python Command Incorrectly Populates Parameters</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/copy-python-command-incorrectly-populates/m-p/1554367#M89708</link>
      <description>&lt;P&gt;First up, just in case...you have to actually replace the&amp;nbsp;r"Path_to_Fishnet" with an output path of where you want to create the file. Either using a variable that you define elsewhere or pasting an explicit filepath in between the speech marks.&lt;BR /&gt;&lt;BR /&gt;Secondly, if you look at the sample script for this tool (on the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-fishnet.htm" target="_self"&gt;help page&lt;/A&gt;) then the format for both the origin coordinate and y axis coordinate is a point (not a number). So the tool is expecting a string separated by a space. I believe the input (based on your toolbox inputs) should look as below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.management.CreateFishnet(
    out_feature_class=r"Path_to_Fishnet",
    origin_coord="0 0",
    y_axis_coord="0 1",
    cell_width=1,
    cell_height=1,
    number_rows=10,
    number_columns=15,
    corner_coord=None,
    labels="LABELS",
    template="DEFAULT",
    geometry_type="POLYLINE"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;Hopefully that gets you to where you need to be. But I accept the copy python command tool isn't doing&amp;nbsp; what it should - spoiler alert - it often doesn't! &lt;span class="lia-unicode-emoji" title=":face_with_tears_of_joy:"&gt;😂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 16:25:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/copy-python-command-incorrectly-populates/m-p/1554367#M89708</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2024-10-31T16:25:49Z</dc:date>
    </item>
  </channel>
</rss>

