nfc_list.append(layer)
fcList = arcpy.listFeatureClasses() for fc in fcList: nfc_list.append(fc)
mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0] mxdlyrs = arcpy.mapping.ListLayers(mxd, "*") for lyr in mxdlyrs: print lyr
I would like to fill a listbox with all of the FCs in a working Arcmap session.
I and do a list from a GDB like
env.workspace = "d:/foo/DefWrkCpc/Mystuff.gdb"
fc_list = arcpy.ListFeatureClasses()
for item in fc_list:
myLstBox(.insert(END,item)
I can't seem to get
mxd = arcpy.mapping.MapDocument("CURRENT")
nlaylst = arcpy.mapping.ListLayers(mxd)
nfc_list = []
for layer in nlaylst:
nfc_list += arcpy.ListFeatureClasses(layer)
To work any ideas?