Preserving GlobalID Values

755
4
12-31-2018 05:49 AM
EdwardBlair
Occasional Contributor

The ArcGIS Pro Append GP tool has an option to preserve GlobalID values - which seems quite useful.  Am wondering if this is available somewhere in the SDK?

Any pointers would be much appreciated.

Thx,

Ed

0 Kudos
4 Replies
RichRuh
Esri Regular Contributor

Hi Ed,

There is a global Preserve Global ID values that applies to geoprocessing and Python, but nothing like that in the C# SDK.

Which methods in the SDK do you wish would preserve global ids but do not currently?

--Rich

EdwardBlair
Occasional Contributor

Hey Rich -

I was hoping to be able to create UN features in an edit operation and be

able to assign a global ID value from a source feature. Reason being would

be that this could preserve global ID values set in a staging database that

were used for building associations. Without this I'm thinking I would

need to build staging database associations and then post-process to update

from/to global ID values in the associations.

As below. (And as always, I may be missing something)

await QueuedTask.Run(() =>

{

var createOperation = new EditOperation();

createOperation.Name = "Load features";

createOperation.SelectNewfeatures = false;

var atts = new Dictionary<string, object>();

atts.Add("SHAPE", myShape);

atts.Add("GlobalID", myGlobalID);

createOperation.Create(myfeatureLayer, atts);

return createOperation.Execute();

}

Thx,

Ed

0 Kudos
RichRuh
Esri Regular Contributor

You definitely cannot specify a global ID when creating a new feature.

One possible idea would be to copy the source table using Append (which preserves IDs) and then make your edits to that new table.

--Rich

0 Kudos
EdwardBlair
Occasional Contributor

Well yes. I presume that Append uses the Python API. Was just wondering

if a similar thing was present in the .NET API. Apparently not.

Thanks for the info!

Ed

0 Kudos