<?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 Re: GridIndexFeatures - syntax error in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260044#M20018</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's great...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a good weekend!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Dec 2012 16:48:14 GMT</pubDate>
    <dc:creator>T__WayneWhitley</dc:creator>
    <dc:date>2012-12-07T16:48:14Z</dc:date>
    <item>
      <title>GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260037#M20011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to create a grid with this GridIndexFeatures tool. I keep getting a syntax error on the parameter for the "polygonWidth" and "polygonHeight". &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm doing this in IDLE: here is what I got so far:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;###script for the intersection of the 2 shapefiles ###&amp;nbsp; ###import the basic mods for the geoprocessor&amp;nbsp; import arcpy, sys, os, traceback, math, string&amp;nbsp; ###set up the workspace you're going to work in&amp;nbsp; from arcpy import env&amp;nbsp; arcpy.env.workspace = "C:\GIS_Data\PGE_MLPP\intergrid.shp"&amp;nbsp; #set local variable outFeatureClass = "intersection" inFeatures = "NonAOC" polygonWidth = "528 feet" polygonHeight = "528 feet"&amp;nbsp; ###Execute the Grid&amp;nbsp; arcpy.GridIndexFeatures_cartography(outFeatureClass, inFeatures, "", "", "", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonWidth, polygonHeight)&amp;nbsp; ###Print print "Done"&amp;nbsp;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:/Users/RLong/Documents/intersect1", line 23, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonWidth, polygonHeight)&lt;BR /&gt;&amp;nbsp; File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\cartography.py", line 787, in GridIndexFeatures&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000732: Input Features: Dataset NonAOC does not exist or is not supported&lt;BR /&gt;ERROR 000398: Value must be positive&lt;BR /&gt;ERROR 000398: Value must be positive&lt;BR /&gt;ERROR 000892: The numeric value is outside of the valid range.&lt;BR /&gt;ERROR 000892: The numeric value is outside of the valid range.&lt;BR /&gt;Failed to execute (GridIndexFeatures).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've done this script (and variants of it) several times, but SINCE I'VE INSTALLED SP5 this is happening. just sayin...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is apprecieated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 14:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260037#M20011</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-12-07T14:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260038#M20012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your workspace setting doesn't look right - it is set to your shapefile in the sample code you posted...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 15:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260038#M20012</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-12-07T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260039#M20013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Your workspace setting doesn't look right - it is set to your shapefile in the sample code you posted...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; Bear with me, but should I just truncate the file path? I want to place the resultant grid in the directory...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thx,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;oops...I just tried to truncate the file path and "EOL -String Literal error popped up"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe I should set up a GEODB and do it that way? It seems like I can have a safe workspace in the GEODB.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 15:26:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260039#M20013</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-12-07T15:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260040#M20014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It can be the root, say (if that folder exists):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = r"C:\GIS_Data\PGE_MLPP"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...or you can designate, say for example, a file gdb (if it exists as well):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = r"C:\GIS_Data\PGE_MLPP\stage.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&amp;nbsp; Just one more thing, what is 'intergrid.shp'?&amp;nbsp; When you set the workspace, remember that is where inputs will be read, and outputs will be written - unless otherwise specified.&amp;nbsp; In other words, your script will look for inFeatures from your workspace and write the result, intersection, there --- which I note, if your workspace is set to a folder, you need to specify a shapefile, intersection.shp.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 15:30:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260040#M20014</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-12-07T15:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260041#M20015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Wayne. I tried the root folder and that error has stopped, HOWEVER, the original error about the "polygonWidth" and "polygonHeight" is still coming up&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;File "C:/Users/RLong/Documents/intersect1", line 23, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; polygonWidth, polygonHeight)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't get it. Should the "intersect1" be the resultant file? I did not create it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 15:37:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260041#M20015</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-12-07T15:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260042#M20016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes I saw that too... try specifying the output file with the '.shp' extension.&amp;nbsp; If you're still having problems, post your code again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...and what is 'NonAOC' - your input will come from your workspace as well, shouldn't it have a '.shp' file extension too?&amp;nbsp; Does it exist?&amp;nbsp; If you're intent is to pull inputs from elsewhere, then you need to specify that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 15:41:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260042#M20016</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-12-07T15:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260043#M20017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wayne, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You're right, I had to put the ".shp" extension. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Worked like a charm...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks and 1,000 karma points for you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 16:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260043#M20017</guid>
      <dc:creator>nimitz</dc:creator>
      <dc:date>2012-12-07T16:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: GridIndexFeatures - syntax error</title>
      <link>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260044#M20018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's great...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have a good weekend!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Dec 2012 16:48:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/gridindexfeatures-syntax-error/m-p/260044#M20018</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2012-12-07T16:48:14Z</dc:date>
    </item>
  </channel>
</rss>

