Is there a way for me to run a tool or script to call how many vertices of a file geodatabase polygon ?
Solved! Go to Solution.
Yes, Tim is right on with that GP tool. Try:
# Import arcpy import arcpy # Define the tool parameters in_fc = r"[path_to_your_polygon_fc]" out_fc = r"[path_to_point_fc]" # Convert the feature vertices to points arcpy.FeatureVerticesToPoints_management(in_fc, out_fc) # Count the features and print the answer print(int(arcpy.GetCount_management(out_fc).getOutput(0)))
I hope it works for you!
Warm Regards,
Micah Babinski
You could use the Feature Vertices To Points (Data Management) tool - ArcGIS Help 10.1
Make sure to use the ALL option:
Creates a feature class containing points generated from specified vertices or locations of the input features.
Yes, Tim is right on with that GP tool. Try:
# Import arcpy import arcpy # Define the tool parameters in_fc = r"[path_to_your_polygon_fc]" out_fc = r"[path_to_point_fc]" # Convert the feature vertices to points arcpy.FeatureVerticesToPoints_management(in_fc, out_fc) # Count the features and print the answer print(int(arcpy.GetCount_management(out_fc).getOutput(0)))
I hope it works for you!
Warm Regards,
Micah Babinski
Is that for shapefiles only ? What about geodatabases ?
Never mind. I got it to work.