I would like to take the output of my intersect and dissolve operations and determine whether it is a shapefile or a geodatabase feature class.If it is a shapefile, I need to add an "area" field and calculate it.First, if I use this:desc = gp.Describe(dissolveOutputFC)
outType = desc.FeatureType
will FeatureType give me the information I need?Second, how do I test it? If I type:desc = gp.Describe(dissolveOutputFC)
outType = desc.FeatureType
print outType
where does it get printed to?I have added the script to a toolbox in arc and specified the parameters that way. I right-click > edit, to make any changes.If I run it using pythonwin, how do I input the parameters? Would it just be "path\file, path\file etc..."?And last but not least, I am asking these simple questions because I can't find any documentation that would help me. When I was learning VBA I would just google "iFeatureClass interface" for example, and that would lead me to the edn documentation that would list all the properties and methods of the interface. Is there something similar for python, or the arcgisscripting module? I am asking the above questions because I wasn't able to find out what gp.Describe is supposed to return.Thanks.Here is my full code, for what it's worth:# Import Modules
import arcgisscripting
#Create Geoprocessor object
gp = arcgisscripting.create(9.3)
gp.overwriteoutput = True
# Intersect Catchments and Land Cover
catchmentsFC = gp.GetParameterAsText(0) #in a toolbox GUI, this should be Type = FeatureLayer
landCoverFC = gp.GetParameterAsText(1) #in a toolbox GUI, this should be Type = FeatureLayer
intersectOutputFC = gp.GetParameterAsText(2) #in a toolbox GUI, this should Type = FeatureClass
gp.Intersect_Analysis (catchmentsFC + ";" + landCoverFC, intersectOutputFC, "ALL", "", "INPUT")
# Dissolve output based on catchment and land cover IDs
# Field UCID (or other catchment ID) needs to be passed from the VBA code
dissolveOutputFC = gp.GetParameterAsText(3) #in a toolbox GUI, this should Type = FeatureClass
gp.Dissolve_management (intersectOutputFC, dissolveOutputFC, "UCID; GRIDCODE", "", "MULTI_PART", "")
# If the output is not a geodatabase feature class, then an area field must be calculated and added...
# And the necessary fields exported to dbf
# If the output is a geodatabase feature class, then the necessary fields are exported to dbf as is
desc = gp.Describe(dissolveOutputFC)
outType = desc.FeatureType
print outType