database - How can you edit the objectID of a row in an ArcGIS geodatabase? -


i trying add row arcgis geodatabase don't want automatic objectid generated row. want insert specific objectid. error: field not editable.

my code follows:

feature = fclass.createfeature(); feature.setvalue((int)_fields[i].targetindex, tripvalue); 

now, in first iteration, _fields[i].targetindex=0 because want insert specific objectid. first iteration gives me error, while rest fine.

any idea on how somehow around automatic objectid ?

short answer:

you don't.

long answer:

using objectid field unique key (which assume you're doing here) considered bad idea, field not static might think - various operations on dataset re-assign them.

one of answers this question suggests copy/pasting data might transfer objectids intact, if you're copying data somewhere else, otherwise should create field use unique key , leave objectid alone.

(incidentally, kind of geodatabase question more intelligent answers on @ gis.se.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -