I've tried running a Python script as a tool in ArcCatalog that accepts two input parameters to perform a union (it's actually the first part of a longer series of geoprocessing tasks I'm testing). I tried re-structuring the script as a stand-alone to run from PythonWin, no errors but also no output generated. Arg! Is there something obvious in the code that I'm missing (such as the syntax for using variables for parameter input in the Union operation)? Thanks for any thoughts.
# Parameters:
# 0 - siteloc
# 1 - zonelayer
import arcgisscripting
gp = arcgisscripting.create(9.3)
import os
import sys
# Set the workspace
gp.Workspace = "C:\ZoneCalc\Scratch"
try:
# Define Parameters:
# Define the Site Location Feature Class
siteloc = gp.GetParameterAsText[0]
# Define the Zone Feature Class - such as Soils, Slope, Wetlands, etc
zonelayer = gp.GetParameterAsText[1]
# Perform Operations:
# UNION the siteloc and zonelayer feature classes, creating a new feature class called output_union
gp.union_analysis(siteloc, zonelayer, "output_union.shp", "NO_FID")
except:
gp.AddError("An error occurred. " + gp.GetMessages(2))