I have gone through the API and samples. But could not find how to set the geoprocessing environment variables Maintain Attachments & Preserve Global IDs using Geoprocessing.MakeEnvironmentArray using ArcGIS Pro SDK. I am calling Append Geoprocessing Tool from ArcGIS Pro SDK. Geoprocessing.MakeEnvironmentArray does not have the KeyValuePair.
Hi,
You can set them like that:
var env = Geoprocessing.MakeEnvironmentArray(maintainAttachments: "True",
preserveGlobalIds: "True");
Name for each setting you can find here:
Sorry, I have not checked existing of parameters.
Have you checked like this:
List<KeyValuePair<string, string>> env1 = new List<KeyValuePair<string, string>>();
env1.Add(new KeyValuePair<string, string>("maintainAttachments", "True"));
env1.Add(new KeyValuePair<string, string>("preserveGlobalIds", "True"));
If you have to set other parameters, you can cast MakeEnvironmentArray result to List and then add additional values.