angelcardenasupsp

How to extract point from polygon to file txt?

Discussion created by angelcardenasupsp on Aug 27, 2012
Latest reply on Aug 27, 2012 by angelcardenasupsp
Hellow
How to extract point from polygon to file txt?
not understand the line 2 and 3
Because I am a boot error " run-time error "" does not exist"
import arcpy  
infc = arcpy.GetParameterAsText(0)  
# Identify the geometry field # 
desc = arcpy.Describe(infc) 
shapefieldname = desc.ShapeFieldName  
# Create search cursor # 
rows = arcpy.SearchCursor(infc)  
# Enter for loop for each feature/row # 
for row in rows:     
# Create the geometry object     #     
 feat = row.getValue(shapefieldname)      
 # Print the current multipoint's ID     #     
 print "Feature %i:" % row.getValue(desc.OIDFieldName)     
 partnum = 0      
 # Step through each part of the feature     #     
 for part in feat:         
  # Print the part number         #         
  print "Part %i:" % partnum          
  # Step through each vertex in the feature         #         
  for pnt in feat.getPart(partnum):             
   if pnt:                 
    # Print x,y coordinates of current point                 #                 
    print pnt.X, pnt.Y             
   else:                 
    # If pnt is None, this represents an interior ring                 #                 
    print "Interior Ring:"         
    partnum += 1       



please help

Outcomes