Here is the current updated Python script that I have. I tried to run the script through Python IDLE and just running it by double-clicking on the file which brings up DOS... and it still seems to lag and lag.I will post this on the Python form and see if someone else can think of something.## Set the necessary product code
import logging
# Import arcpy module
import arcpy
from arcpy import env
# if run in ArcGIS Desktop, show messages, also print to log
def log(method, msg):
print msg
method(msg)
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s %(levelname)-s %(message)s',
datefmt='%a, %d %b %Y %H:%M:%S',
filename='ServiceLocation_CISAccountData_Updates.log',
filemode='w'
)
log(logging.info, "Updating Service Locations Feature Class Begins")
# Set environment settings
env.workspace = "C:\\MEWCo GIS System\\Electric System\\MEWCo_Electric_Model-LOCAL.gdb"
# Set Local variables:
inFeatures = "SERVICE_LOCATION" # Service Location Feature Class
layerName = "SERVICE_LOCATION_LAYER" # Service Location Feature Layer
fieldName1 = "SERVICE_ADDRESS"
expression1 = "CIS_Account_Data.SERVICE_ADDRESS"
joinField = "POLE_NUMBER"
joinField2 = "MAPNO"
joinTable = "CIS_Account_Data"
# Create a Feature Layer from Service_Location Feature Class
log(logging.info, "Create Feature Layer for Service Location Feature Class")
arcpy.MakeFeatureLayer_management(inFeatures, layerName)
# Join the feature layer to a table
log(logging.info, "Join Table to Feature Layer Service Location")
arcpy.AddJoin_management(layerName, joinField, joinTable, joinField2)
# Process: Calculate Field (Member Number)
log(logging.info, "Update Member Number Field")
arcpy.CalculateField_management(layerName, "SERVICE_LOCATION.MEMBER_NUMBER", '!MEMBERNO!', "PYTHON")
log(logging.info, "Complete")