help with a script?

Tanya Diamond tdseeker at msn.com
Mon Dec 5 21:11:50 CET 2005


Hello,
    I am trying to write a script to convert three feature layers at a time to raster layers, as seen below.  I was wondering if there is any available help for this or if you knew of any user groups that could help?  Thanks s much for your time.
sincerely,
Tanya

# Converts a Feature to a Raster
# Import system modules
import sys
from win32com.client import Dispatch

# PARAMETERS: set by the user  
theLayerName  = sys.argv [1]  # shapefiles
theLayerName  = sys.argv [2]
theLayerName  = sys.argv [3]

# Creates the Geoprocessing Object
GP = Dispatch("esriGeoprocessing.GPDispatch.1")
# Collects records
theFeatureList = GP.SearchCursor (theLayerName)

# Process: FeatureToRaster_conversion
gp.FeatureToRaster_conversion(InFeatures, OutRaster)

# split the raster layers results
theRasterResults = this.FeatureToRaster_conversion.split(",")

# Print error message if an error occurs
gp.GetMessages()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051205/72b58e32/attachment.html>


More information about the Python-list mailing list