hey , i have the basic licence therere for i cant use Feature Vertices to Points tool.
i've found a code over the internet from this blog:
Emil's Arc/GIS/Python: ArcGIS polygon to lines and feature vertices to points without an ArcGIS advanced license (emilsarcpython.blogspot.com)
this is the code:
#feature vertices to points
import arcpy
def VerticesToPoints (inFc, workspace, fcName):
outFc = UniqueFileName(workspace, fcName)
try:
#let esri do it (advanced license)
arcpy.FeatureVerticesToPoints_management (inFc, outFc)
return outFc
except:
pass
#no advanced license
sr = arcpy.Describe (inFc).spatialReference
outPath, outName = os.path.split (outFc)
arcpy.CreateFeatureclass_management (outPath,
outName,
"POINT",
spatial_reference = sr)
with arcpy.da.InsertCursor (outFc, "SHAPE@") as iCurs:
with arcpy.da.SearchCursor (inFc, "SHAPE@") as sCurs:
for geom, in sCurs:
for i in range (geom.partCount):
part = geom.getPart (i)
for pnt in part:
if not pnt:
continue
row = (pnt,)
iCurs.insertRow (row)
del iCurs
del sCurs
return outFc
now, i tried to put my inputs in this code but it wont run..
my inputs are:
the existing polyine is called :'zpoints.shp'
and my output directory is :'c:/gis/project'
the new point layer to be created is called: 'test.shp'
where i need to write my inputs in the code?
thanks for the help!