Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Python gp.deletefeatures - PLEASE HELP

$
0
0
Hi Folks,
I have a script that extracts records from an online sharepoint list and appends them to a feature class... Every time the script runs the first thing it does is:

theFC = r"D:\GISScheduledTasks\LEDProjectExporter\...\GIS.LEDTrackingList"
gp.deletefeatures(theFC)

print "Features Deleted"

This is followed by a series of fieldList.append() statements for each column in the FC, which populates the whole thing right from Sharepoint.

Ideally I'd want to be able to edit features in the feature class, but currently doing so means any changes I make get overwritten the next time the script runs, since the FC gets deleted and re-created each time. I have a field in the FC that determines whether that row has been verified or not.. Verified = YES or NO. Id like to be able to update the FC from Sharepoint IF the Verified Column in the FC is NO, otherwise keep what is there..

Is there something I can use besides gp.deletefeatures or perhaps within an If statement block where this will work? any ideas?

Thanks
JS

Viewing all articles
Browse latest Browse all 2485

Trending Articles