<?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 MakeTableView_management frustrations in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514739#M40402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.0, WinXP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a similar issue to that posted in&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/59172-MakeTableView_management-causes-an-exception-when-outside-of-ArcMap"&gt;http://forums.arcgis.com/threads/59172-MakeTableView_management-causes-an-exception-when-outside-of-ArcMap&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, though I can get the table added successfully using the following lines in the python immediate window&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; x = 'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;u'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.MakeTableView_management('bf_201211011009_workspaces', 'test')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Result 'test'&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the following lines in a script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("AddResults ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x = u'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(arcpy.env.workspace)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeTableView_management('bf_201211011009_workspaces', 'test')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;don't work! There is no exception thrown, the script outputs to the gp results window:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AddResults &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;P:\Work\CMA_LMD\Users\dbye\Data\2012\scratch.gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Completed script ScanWorkspace2GDB...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Succeeded at Thu Nov 01 15:06:08 2012 (Elapsed Time: 19.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But no table is added to the map document...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope I have stared at this way to long and overlooking something simple. What looks like identical code executes perfectly in the python window, but won't work in a script. Note also that I have also set the scratchWorkspace equivalent both in code and environment just in case that's a factor but to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas much appreciated. Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 03:26:14 GMT</pubDate>
    <dc:creator>DaveBye</dc:creator>
    <dc:date>2012-11-01T03:26:14Z</dc:date>
    <item>
      <title>MakeTableView_management frustrations</title>
      <link>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514739#M40402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS 10.0, WinXP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a similar issue to that posted in&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/59172-MakeTableView_management-causes-an-exception-when-outside-of-ArcMap"&gt;http://forums.arcgis.com/threads/59172-MakeTableView_management-causes-an-exception-when-outside-of-ArcMap&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however, though I can get the table added successfully using the following lines in the python immediate window&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; x = 'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;u'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.MakeTableView_management('bf_201211011009_workspaces', 'test')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;Result 'test'&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the following lines in a script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage("AddResults ")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x = u'P:\\Work\\CMA_LMD\\Users\\dbye\\Data\\2012\\scratch.gdb'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.env.workspace = x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(arcpy.env.workspace)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeTableView_management('bf_201211011009_workspaces', 'test')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;don't work! There is no exception thrown, the script outputs to the gp results window:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AddResults &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;P:\Work\CMA_LMD\Users\dbye\Data\2012\scratch.gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Completed script ScanWorkspace2GDB...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Succeeded at Thu Nov 01 15:06:08 2012 (Elapsed Time: 19.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But no table is added to the map document...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope I have stared at this way to long and overlooking something simple. What looks like identical code executes perfectly in the python window, but won't work in a script. Note also that I have also set the scratchWorkspace equivalent both in code and environment just in case that's a factor but to no avail.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas much appreciated. Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 03:26:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514739#M40402</guid>
      <dc:creator>DaveBye</dc:creator>
      <dc:date>2012-11-01T03:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: MakeTableView_management frustrations</title>
      <link>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514740#M40403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In your Geoprocessing Options, do you have "overwrite the outputs of geoprocessing operations" and "add results of geoprocessing operations to the display" checked?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also find it odd it takes 19 seconds to make a table view.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: You may have to make a permanent table to see it in your mxd after the tool runs.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 13:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514740#M40403</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2012-11-01T13:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: MakeTableView_management frustrations</title>
      <link>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514741#M40404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, thanks very much for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes the overwrite and add results options are both set true. I have just re-installed ArcGis Desktop. No fix.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regarding the time, there was a little bit of code running examining directories, thus the 19 seconds. However this made me &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;check it up, and the lines of code that run from the python window, and SUCCEED return the following message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Start Time: Tue Nov 06 09:54:00 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Succeeded at Tue Nov 06 09:54:10 2012 (Elapsed Time: 10.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The lines of code, exact, nothing extra running from script, doesn't add the table but reports:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Executing: tester&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Start Time: Tue Nov 06 09:55:26 2012&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Running script tester...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;AddResults &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;P:\Work\CMA_LMD\Users\dbye\Data\2012\scratch.gdb&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Completed script tester...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Succeeded at Tue Nov 06 09:55:27 2012 (Elapsed Time: 1.00 seconds)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now the other noticeable thing is that the immediate window launches a 'make table view' tool, which shows a normal tool &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;status message in the status bar, which finally pops up with success. If the script is run without the 'always run in foreground' &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;option set then the standard 'script' status/result appears but still fails! So I wonder if somehow the actual 'make table view' tool &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;is actually being launched, or whether the script messages are just hiding the tool's message?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached a small zip with a single table gdb and the code in script, should anyone be able to help further with this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 21:46:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/maketableview-management-frustrations/m-p/514741#M40404</guid>
      <dc:creator>DaveBye</dc:creator>
      <dc:date>2012-11-05T21:46:10Z</dc:date>
    </item>
  </channel>
</rss>

