<?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: Inconsistent CalculateField with python vs VB in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386585#M30509</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I got an error when I use VB option in my python scripts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;/P&gt;&lt;P&gt;temp = "S:\\AVM\\ArcCatalogAvmConnections\\ro_gis(AVM).sde\\avm.AVM.Parcel_PolyOnly_Select_Ident1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Calculate Field&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12853_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 18:05:43 GMT</pubDate>
    <dc:creator>alicexu</dc:creator>
    <dc:date>2014-09-16T18:05:43Z</dc:date>
    <item>
      <title>Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386575#M30499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;result of arcpy.CalculateField_management with python is inconsistent but with VB, it is ok&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 14:52:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386575#M30499</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T14:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386576#M30500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no way anyone can help you or replicate what you are reporting without the specific calculation code you are using.&amp;nbsp; Please post your calculation.&amp;nbsp; Otherwise, if you are just making a general statement about calculation behaviors using the two languages then your observation is not true for any of the calculations I do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:04:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386576#M30500</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T15:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386577#M30501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;arcpy.CalculateField_management(temp, "ft", "!SHAPE.area!", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;result:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12842_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/P&gt;&lt;P&gt;result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/12844_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:29:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386577#M30501</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T15:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386578#M30502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;VB: arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12847_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Python: &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;arcpy.CalculateField_management(temp, "ft", "!SHAPE.area!", "PYTHON_9.3", "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/12848_pastedImage_3.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:49:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386578#M30502</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T15:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386579#M30503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;Alice:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What database are you using for this feature class, SDE? File Geodatabase? Personal Geodatabase?&amp;nbsp; (it does not appear it could be a shapefile based on the field names).&amp;nbsp; If it is SDE, what underlying database is SDE using?&amp;nbsp; What version of ArcMap do you have?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible that rather than just transferring the value in the shape.area field the Python version is processing the actual shape geometry directly and perhaps altering it if the original geometry contains such things as true curves, rather than densified lines to form a curve.&amp;nbsp; Python has issues with true curves.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are at version 10.0 or above, the VB Script calculation has no access to the actual geometry and can only process the value in the shape.area field as a numeric field, so the methodologies underlying the two languages could be different.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:52:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386579#M30503</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T15:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386580#M30504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's SDE. I'm calculating the same polygon but results are different from using VB vs Python&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:56:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386580#M30504</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T15:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386581#M30505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Flavor of SDE?&amp;nbsp; ArcMap version?&amp;nbsp; SDE database version?&amp;nbsp; How was the polygon geometry created?&amp;nbsp; COGO, buffer tool, parcel fabric processes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All such details can potentially play an important role in what you are observing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, ultimately this question has to be posed directly to Esri, because the Field Calculator is a black box for everyone except for the developers of the tool.&amp;nbsp; All of the details above will be required to make the report.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386581#M30505</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T15:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386582#M30506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12849_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;ArcGIS 10.2.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 16:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386582#M30506</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T16:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386583#M30507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you are right - it happened all polygons with curves (see the map - the blue are shapes without curves and they are correct numbers as shape.area, the red polygons are shapes with curves and they are different from shape.area...). So, how can I still use python but get the true result like using VB since I need to write python scripts for my nightly process? Many thanks &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12850_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 16:25:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386583#M30507</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T16:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386584#M30508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the VB version of the calculation works, go ahead and include it in the nightly script.&amp;nbsp; They work for my nightly scripts and I use VB in my Python script Field Calculations more than Python_9.3 or Python.&amp;nbsp; Here are examples of VB script Field calculations I actually use in my nightly Python scripts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Empty string assignment:&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(CENTERLINE_ROUTES_MERGED__3_, "ROUTE_ALT1", "\" \"", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Numeric Value assignment:&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(CENTERLINE_EXTENDED_Layer__13_, "CENTERLINE_EXTENDED.TRANSFERRED", "1", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Date/Time assignment:&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(SCRIPT_LOG_View, "FINISH_TIME", "Now (&amp;nbsp; )", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field data transfers in an unjoined table&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(CENTERLINE_ROUTES_MERGED__5_, "ROUTE_NAME", "[ROUTE_ALT1]", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field data transfers between joined tables&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5;"&gt;arcpy.CalculateField_management(RDNUMBER_Routes_Layer, "RDNUMBER_Routes.First_STNAME", "[RDNUMBERS_ALL.FIRST_STNAME]", "VB", "")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calculation you are doing is in the Field data transfers in an unjoined table category and should work fine in your nightly python script.&amp;nbsp; I have found that only VB Script multi-line advanced field calculations are not supported in a Python script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 17:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386584#M30508</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T17:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386585#M30509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I got an error when I use VB option in my python scripts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;/P&gt;&lt;P&gt;temp = "S:\\AVM\\ArcCatalogAvmConnections\\ro_gis(AVM).sde\\avm.AVM.Parcel_PolyOnly_Select_Ident1"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Calculate Field&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/12853_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 18:05:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386585#M30509</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T18:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386586#M30510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ran the following script using SDE under SQL server and it worked without error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14108937293114107 jive_text_macro" jivemacro_uid="_14108937293114107"&gt;
&lt;P&gt;# Import arcpy module&lt;/P&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Local variables:&lt;/P&gt;
&lt;P&gt;temp = r"C:\Users\RFAIRHUR\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\Trans Connection to SQL Server.sde\GDB_TRANS.TRANS.Test_Area"&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;# Process: Calculate Field&lt;/P&gt;
&lt;P&gt;arcpy.CalculateField_management(temp, "ft", "[Shape.STArea()]", "VB", "")&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I noticed that I have never had a field name called [Shape.area].&amp;nbsp; In my file geodatabase it is [Shape_area} and in my SDE database it is [Shape.STArea()].&amp;nbsp; But this could be a difference in the way my SDE administrator set my SDE geometry defaults up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is being run on a computer with an Advanced Desktop license install.&amp;nbsp; I have never used ArcGIS Engine license if that is what you are using.&amp;nbsp; You would have to pose your question to users of Engine if that is what you are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be an installation option issue.&amp;nbsp; I also do not do ArcGIS installations, so if my IT staff enabled some option that lets my script run that was not enabled when your install was done, I would not know what option that might have been,&amp;nbsp; I only know that with Desktop installs there is a way to get VB Field Calculations to work within Python scripts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 19:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386586#M30510</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386587#M30511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Richard. I'm going to set up a job in sql to see if this works for me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 19:39:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386587#M30511</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T19:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386588#M30512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard, I tried in sql and got an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt; File "C:\AVM\SDELog\2.py", line 17, in &amp;lt;module&amp;gt;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/TD&gt;&lt;TD&gt;File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 3354, in CalculateField&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;raise e&amp;nbsp; arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&amp;nbsp; ERROR 000989: Tool CalculateField cannot use VB expressions for services&amp;nbsp; Failed to execute (CalculateField).&amp;nbsp; Process Exit Code 1.&amp;nbsp; The step failed.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Here's my python codes for this job in sql:&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Local variables:&lt;/P&gt;&lt;P&gt;temp = r'C:\AVM\AVM @ RO_GIS - AVM.sde\avm.AVM.Parcel_PolyOnly_Select_Ident1'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Calculate Field&lt;/P&gt;&lt;P&gt;arcpy.CalculateField_management(temp, "ft", "[shape.area]", "VB", "")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 20:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386588#M30512</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-16T20:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386589#M30513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have never processed a script on a service, only on normal SDE connections through Desktop, so this may be a restriction when you are using services. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In that case, I have no solution for your problem if you are using services other than to run your nightly scripts against the Desktop SDE connection and replicate the result to the service.&amp;nbsp; All versions of python will always simplify all of your true curves when they operate on your geometry and you will see a change the in the area output from what you see in the area field.&amp;nbsp; Your only other option would be to permanently convert all of the polygons with true curves to high density N-gons to get both the VB Script and the Python calculations to return the same reported area shown in the shape.area field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if this was all done against a standard Desktop SDE connection you could use a VB Script calculation in a nightly Python script, but the same is not necessarily true for an SDE service.&amp;nbsp; So the details of every aspect of your set up can be significant in determining the cause of the behavior and the different configurations of your data storage, software, database connections, etc. can all play a key role in the behavior of a given process.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 20:39:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386589#M30513</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2014-09-16T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386590#M30514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; But I got an error when I use VB option in my python scripts&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure your Python script is running in 32-bit Python. Calculate Field's VB parser is only supported with 32-bit arcpy, in 64-bit you must use PYTHON or PYTHON_9.3 or the tool fails.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 05:54:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386590#M30514</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-18T05:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386591#M30515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Richard.&lt;/P&gt;&lt;P&gt;I’ll try the sql route to get this. Thank you very much for your helps! &lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 14:40:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386591#M30515</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-18T14:40:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386592#M30516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;Thanks for your reply. How can I specify to use 32-bit Python when I run the Python scripts?&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 14:43:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386592#M30516</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-18T14:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386593#M30517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On Windows, you'd run the python script with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cmd /c C:\python27\ArcGIS10.1\python.exe myfile.py&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also configure your IDE shortcut to run 32-bit (the default IDLE Python is the last one installed -- usually 64 bit). This of course varies by IDE. For example, I have an IDLE-32 windows shortcut that uses this execute line: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C:\Python27\ArcGIS10.1\pythonw.exe "C:\Python27\ArcGIS10.1\Lib\idlelib\idle.pyw"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 18:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386593#M30517</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-09-19T18:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistent CalculateField with python vs VB</title>
      <link>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386594#M30518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Curtis. I tried and got this error...&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.esri.com/legacyfs/online/13776_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Sep 2014 20:29:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/inconsistent-calculatefield-with-python-vs-vb/m-p/386594#M30518</guid>
      <dc:creator>alicexu</dc:creator>
      <dc:date>2014-09-19T20:29:07Z</dc:date>
    </item>
  </channel>
</rss>

