Hi.
I am attempting to add an If statement to my Python script. What I am wanting to do is query a field in a shapefile and if it returns true delete a different shapefile. The principle idea behind my code is; If "Region" in the Clip_Feature shapefile = 'Murray Inland' then delete the contour shapefile. My problem is I don't know how to get focus onto the the Clip_Feature shapefile. The code I have so far is:
import sys, string, os, arcgisscripting
gp = arcgisscripting.create(9.3)
Contours = "\\\\Atlas\\data\\geodata\\state\\contour\\arc"
Crossings = "\\\\Atlas\\data\\geodata\\state\\crossings\\arc"
Contour = "Contour.shp"
Crossing = "Crossing.shp"
P_L = "C:\\Daves_Stuff\\ArcPad_Data\\Standard_Layers\\Lamberts_Projection\\Pts_Lines"
Clip_Feature = "C:\\Daves_Stuff\\ArcPad_Data\\Standard_Layers\\Clip_Feature\\Clip_Feature.shp"
gp.FeatureClassToFeatureClass_conversion(Contours, P_L, Contour, "")
gp.FeatureClassToFeatureClass_conversion(Crossings, P_L, Crossing, "")
gp.workspace = "C:\\Daves_Stuff\\ArcPad_Data\\Standard_Layers\\Clip_Feature"
if "Region_No" == 3:
gp.Delete_management("C:\\Daves_Stuff\\ArcPad_Data\\Standard_Layers\\Lamberts_Projection\\Pts_Lines\\Contour.shp")
Thanks in advance.