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.
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.
Geoprocessing.MakeEnvironmentArray does not have KeyValuePair for maintainAttachments & preserveGlobalIds in ArcGIS Pro SDK. Attached is the snap shot for reference. Will these variables would be included in future releases.
Hi,
You can set them like that:
var env = Geoprocessing.MakeEnvironmentArray(maintainAttachments: "True", preserveGlobalIds: "True");
Name for each setting you can find here:
https://pro.arcgis.com/en/pro-app/latest/tool-reference/environment-settings/an-overview-of-geoprocessing-environment-settings.htm
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.