I am very bad at python and I can't even get this script to work and the worst about this is that its really small script.
Lets say I have a shapefile in C:\temp\test.shp and I want to list all the field names in that shapefile.
Lets say a featureclass with 4 fieldnames: TYPE, NAME, SPEED, AREAand I want to list the fieldnames. I thought this worked but it did not:
import arcpyfclass = "C:/Data/Municipal.gdb/Hospitals"fieldnames = [f.name for f in arcpy.ListFields(fclass)]Can you help me? What do I need to think about if I have a featureclass in .GDB or want to use a featureclass from mxd.
Does python list in window the field names or can I get an output to like .txt I am interested in both ways so I can learn. thanks
أكثر...
Lets say I have a shapefile in C:\temp\test.shp and I want to list all the field names in that shapefile.
Lets say a featureclass with 4 fieldnames: TYPE, NAME, SPEED, AREAand I want to list the fieldnames. I thought this worked but it did not:
import arcpyfclass = "C:/Data/Municipal.gdb/Hospitals"fieldnames = [f.name for f in arcpy.ListFields(fclass)]Can you help me? What do I need to think about if I have a featureclass in .GDB or want to use a featureclass from mxd.
Does python list in window the field names or can I get an output to like .txt I am interested in both ways so I can learn. thanks
أكثر...