@echo off set pyexePath="C:\Python26\ArcGIS10.0\python.exe" set pylogPath="C:\GIS\ServerProcesses\Bezier_Removal\Bezier_Remover_Simplify.log" set BezRemove_pyPath="C:\GIS\ServerProcesses\Bezier_Removal\01_Bezier_Remover.py" echo Start time: %time% > %pylogPath% REM Run the python script echo ------ Update time: %time% echo ------ Removing Bezier curves from RDCL in Transportation GDB -------- echo ------ Removing Bezier curves from RDCL in Transportation GDB -------- >> %pylogPath% %pyexePath% %BezRemove_pyPath% >> %pylogPath% echo End time: %time% >> %pylogPath%
# --------------------------------------------------------------------------- # Bezier_Remover.py # Created on: 2011-11-15 15:27:13.00000 # (generated by ArcGIS/ModelBuilder) # Description: # --------------------------------------------------------------------------- # Import arcpy module import sys, string, os import arcpy import arcpy.mapping from arcpy import env import smtplib #E-mail library # Set environment arcpy.env.overwriteOutput = True # Local variables: RDCL_SRCH__2_ = "RDCL_SRCH" TRANS_RDCL_SRCH = r"\\Server\GIS\Enterprise\Data\transportation\Transportation.gdb\TRANSPORTATION_RDCL_SRCH" try: print("Densifying TRANSPORTATION_RDCL to remove Bezier Curves") # Process: Densify arcpy.Densify_edit(TRANS_RDCL_SRCH, "DISTANCE", "25 Feet") except: print arcpy.GetMessages(2) SUBJECT = "Road Densify Script Failed" TO = "person@mail.org" FROM = "Process_Server" text = "Removal of Bezier Curves in Roads failed" BODY = string.join(( "From: %s" % FROM, "To: %s" % TO, "Subject: %s" % SUBJECT , "", text ), "") server = smtplib.SMTP('mail server address',mail server port #) #server = smtplib.SMTP(HOST) server.sendmail(FROM, [TO], BODY) server.quit()
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.