newrows = gp.searchcursor("IN_MEMORY\TempDT") newrow = newrows.next() while newrow: gp.AddMessage("Inserted: " + str(newrow.gis_station) + ", " + str(newrow.station) + ", " + str(newrow.sample_date) newrow = newrows.next()
tab = "IN_MEMORY\TempDT" memtabname = "inmemtab" gp.MakeTableView_management(tab, memtabname) gp.AddJoin_management(memtabname, "gis_station", fc, "STATION", "KEEP_ALL") gp.copyfeatures_management(fc, tempFC)
Solved! Go to Solution.
tab = "IN_MEMORY\TempDT" gp.MakeFeatureLayer_management (fc, "pointFC") ### convert the FC memtabname = "inmemtab" gp.MakeTableView_management("IN_MEMORY\TempDT", memtabname) ### convert the in_memory table gp.AddJoin_management("pointFC", "STATION", memtabname, "gis_station", "KEEP_ALL") if gp.Exists(tmpLayer): gp.Delete_management(tmpLayer) gp.CopyFeatures_management("pointFC", tmpLayer)
tab = "IN_MEMORY\TempDT" gp.MakeFeatureLayer_management (fc, "pointFC") ### convert the FC memtabname = "inmemtab" gp.MakeTableView_management("IN_MEMORY\TempDT", memtabname) ### convert the in_memory table gp.AddJoin_management("pointFC", "STATION", memtabname, "gis_station", "KEEP_ALL") if gp.Exists(tmpLayer): gp.Delete_management(tmpLayer) gp.CopyFeatures_management("pointFC", tmpLayer)
You should mark your own post as the answer. It makes it easier for someone looking for the correct answer to find your post. When doing a search, you're returned a list of threads, with the answered ones marked by a green "A". Wouldn't you look at those threads first?