<br><font size=2 face="sans-serif">Frank-</font>
<br>
<br><font size=2 face="sans-serif">How are you trying to run the script?</font>
<br>
<br><font size=2 face="sans-serif">Are you trying to use a front-end through
ArcTool box, running it from the command line, or running it in PythonWin?</font>
<br>
<br><font size=2 face="sans-serif">All three should be roughly equivalent,
however, it sounds like you trying to Access the script the Toolbox or
Model Builder and ArcGIS is interpreting the script as being a VBScript
and not python.</font>
<br>
<br><font size=2 face="sans-serif">Send me a private e-mail and we can
discuss this some more (and I will bring my training materials to the office
tommorrow), but I don' t think this is an issue for the general list, as
it is an ESRI issue and not a Python issue.</font>
<br>
<br><font size=2 face="sans-serif">HTH-</font>
<br>
<br><font size=2 face="sans-serif">Eric</font>
<br>
<br><font size=2 face="sans-serif">Eric B. Powell</font>
<br><font size=2 face="sans-serif">Bechtel Savnnah River Inc.<br>
(803) 557-6612<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Frank Peacock&quot;
&lt;fepeacock@bulldoghome.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: python-win32-bounces@python.org</font>
<p><font size=1 face="sans-serif">11/07/2005 10:34 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
fepeacock@bulldoghome.com</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&lt;python-win32@python.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[python-win32] VBScript compilation
error - expected end of &nbsp; &nbsp; &nbsp; &nbsp;statement</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hello<br>
<br>
I am running a python script which calls an ESRI ArcGIS COM function called<br>
calculatefield. If the text variable I pass to this function is longer
than<br>
10 characters I get the following error: &quot;Microsoft VBScript compilation<br>
error - expected end of statement&quot;. I do not know what I need to do
to solve<br>
this problem. I have installed the latest WSH 5.6 but to no avail.<br>
<br>
The following is my code:<br>
<br>
# --------------------------------------------------------------------------<br>
-<br>
# Create Time Field.py<br>
# Created on: Sun Nov 06 2005 11:37:26 PM<br>
# &nbsp; (generated by ArcGIS/ModelBuilder)<br>
# --------------------------------------------------------------------------<br>
-<br>
<br>
# Import system modules<br>
import sys, string, os, win32com.client<br>
<br>
# Create the Geoprocessor object<br>
gp = win32com.client.Dispatch(&quot;esriGeoprocessing.GpDispatch.1&quot;)<br>
gp.SetProduct(&quot;ArcView&quot;)<br>
<br>
# Load required toolboxes...<br>
gp.AddToolbox(&quot;C:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Data Management<br>
Tools.tbx&quot;)<br>
<br>
# Local variables...<br>
gp.workspace = &quot;C:\\GIS_DATA\\Satellite\\CLAUS\\I2-235\\&quot;<br>
<br>
try:<br>
 &nbsp; &nbsp;fas=gp.ListFeatureClasses(&quot;*&quot;,&quot;POLYGON&quot;)<br>
 &nbsp; &nbsp;fas.reset()<br>
 &nbsp; &nbsp;fa=fas.next()<br>
 &nbsp; &nbsp;while fa:<br>
 &nbsp; &nbsp; &nbsp; &nbsp;text=fa[0:11]<br>
 &nbsp; &nbsp; &nbsp; &nbsp;print text<br>
 &nbsp; &nbsp; &nbsp; &nbsp;# Process: Calculate Field...<br>
 &nbsp; &nbsp; &nbsp; &nbsp;gp.CalculateField_management(fa, &quot;Time&quot;,
text)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;fa=fas.next()<br>
except:<br>
 &nbsp; &nbsp;gp.AddMessage(gp.GetMessages(2))<br>
 &nbsp; &nbsp;print gp.GetMessages(2)<br>
<br>
<br>
---<br>
[This E-mail has been scanned for viruses but it is your responsibility
<br>
to maintain up to date anti virus software on the device that you are<br>
currently using to read this email. ]<br>
<br>
_______________________________________________<br>
Python-win32 mailing list<br>
Python-win32@python.org<br>
http://mail.python.org/mailman/listinfo/python-win32<br>
</tt></font>
<br>