nimitz

create new point from centroid grid

Discussion created by nimitz on Dec 5, 2012
Latest reply on Dec 10, 2012 by arekmatoszka
Hey all,
I've been working on creating a point shapefile from the centroid of a polygon grid I created for mapbook purposes. I have a simple script that is coming back with this error:"Traceback (most recent call last):
  File "C:\Users\RLong\Documents\NewPoint.py", line 19, in <module>
    arcpy.FeaturetoPoint_management("GridIndex", "SamplesLoc", "Centroid")
AttributeError: 'module' object has no attribute 'FeaturetoPoint_management'"

Here is my code so far:
###Simple point shape file object for testing
###
###Import standard modules

import os, sys, math, arcpy, traceback, string, fileinput

###Setup your workspace or file you're going to use

from arcpy import env

arcpy.env.workspace = "C:/Users/RLong/GIS_Data/Conversions/GridIndex.shp"

###Setup Local variables
in_features = "GridIndex.shp"
point_location = "Centroid"
out_feature_class = "SamplesLoc"

###Create the points
arcpy.FeaturetoPoint_management("GridIndex", "SamplesLoc", "Centroid")


Could this error be coming up cuz I don't have arcinfo?

Any help is appreciated,
Randy

Outcomes