GISGURU_001

I Need Your Help Please

Discussion created by GISGURU_001 on Aug 25, 2012
Latest reply on Aug 29, 2012 by clthompson
I am trying to generate a create a folder and the name of this folder would be derived from an attribute value by using the searchCursor and at the same time generate a pdf output which name would also be derived from an attribute valve using the search cursor. This my code below, ive been having serious issues with the folder path as the application claims my output destination does not exist.

arcpy.SelectLayerByLocation_management("Parcels", "COMPLETELY_WITHIN", "ClipFeature", "", "NEW_SELECTION")
fc = "Parcels"
field = "LGA"
cursor = arcpy.SearchCursor(fc)
for row in cursor:
    row.getValue(field)
val = row.getValue(field)
field = "District"
cursor = arcpy.SearchCursor(fc)
for row in cursor:
    row.getValue(field)
val1 = row.getValue(field)
field = "Block_No"
cursor = arcpy.SearchCursor(fc)
for row in cursor:
    row.getValue(field)
val2 = row.getValue(field)
field = "Plot_No"
cursor = arcpy.SearchCursor(fc)
for row in cursor:
    row.getValue(field)
val3 = row.getValue(field)
outName = str(val) + "LGA" 
outName = "Block" + str(val) + "Plot_" + str(val2)
outName1 = "Block_" + str(val2) + "Plot_" + str(val3) + str(val1) + "Area of" + str(val) + "_LGA" + ".pdf"
outName2 = str(val1) + "AREA" 
outName3 = "Block" + str(val2) #+ "Plot_" + str(val3)
outName4 = "Plot_" + str(val3)
arcpy.CreateFolder_management("C:\ETE_STATE",outName,outName2,outName3,outName4)
arcpy.mapping.ExportToPDF(mxd,"C:\ETE_STATE", outName+outName2+outName3+outName4+ outName1)


Please your suggestions would be appreciated. Thanks (Ive also included my script as an attachment)

Attachments

Outcomes