Hello all!So I am really new to Python.I had to convert a Matlab Script into Python script in order to be able to add it as a script tool in Arcmap.I am having a hard time figuring out how to input a shapefile into my script. My whole script runs based on the shapefile so I have no way of checking if it works unless it reads the shapefile.Thanks in advance!!
import arcpy inputShp = r'C:\Path\to\some\shapefile.shp' outputShp = r'C:\Path\to\other\shapefile.shp' # do something with the shapefile arcpy.CopyFeatures_management(inputShp, outputShp)
import arcpy inputShp = arcpy.GetParameterAsText(0) # do something with the shapefile
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.