<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Update environment settings in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358672#M10834</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/73696"&gt;@pocalipse&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;is correct that there is not a way through the Pro .NET API to change or set Geoprocessing Environments for your project.&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/73696"&gt;@pocalipse&lt;/a&gt;&amp;nbsp;can you explain what your intention is for having an Add-in or Extension or other SDK element setting the project Geoprocessing environments?&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;mentioned the MakeEnvironmentArray function, which you can use to set all of desired environment settings, then reuse that environment array for any tools you run using ExecuteToolAsync, so the effect can be quite similar to setting the environments to the project. For example (pseudo code)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var env = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: a_spatial_reference, extent: an_extent_window);

Geoprocessing.ExecuteToolAsync(tool1, params1, env);
Geoprocessing.ExecuteToolAsync(tool2, params2, env);
Geoprocessing.ExecuteToolAsync(tool3, params3, env);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Maybe you have a different reason for setting the project's geoprocessing environments beyond their use for environments used in the tools you execute in an Add-in. Please let us know any details for this request.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this is the SDK Questions forum, and the question is answered that we do not have a function to set project environments in .NET, if you would like to submit an idea like "Update project's geoprocessing environments using .NET" to the ArcGIS Pro Ideas site, we can get comments from the user community and use that to try to prioritize this new development work.&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/idb-p/arcgis-pro-ideas" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-ideas/idb-p/arcgis-pro-ideas&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Dec 2023 17:50:37 GMT</pubDate>
    <dc:creator>DrewFlater</dc:creator>
    <dc:date>2023-12-08T17:50:37Z</dc:date>
    <item>
      <title>Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357345#M10805</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;How do I update/set an environment setting in ArcGIS PRO using C# ?&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Jens Søe&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 14:08:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357345#M10805</guid>
      <dc:creator>pocalipse</dc:creator>
      <dc:date>2023-12-06T14:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357535#M10813</link>
      <description>&lt;P&gt;eg:&amp;nbsp;&lt;A title="StackOverflow: How do I get and set Environment variables in C#?" href="https://stackoverflow.com/questions/185208/how-do-i-get-and-set-environment-variables-in-c" target="_self"&gt;https://stackoverflow.com/questions/185208/how-do-i-get-and-set-environment-variables-in-c&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 18:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357535#M10813</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2023-12-06T18:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357889#M10820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It isn't he system environments variables I'm seeking - it is the list of environment settings in ArcGIS PRO found under the analysis TAB:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pocalipse_0-1701950043313.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88274iBC6FDE41B56B2D52/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pocalipse_0-1701950043313.png" alt="pocalipse_0-1701950043313.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It is pretty easy in Python but how do I set these using .net ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 11:54:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1357889#M10820</guid>
      <dc:creator>pocalipse</dc:creator>
      <dc:date>2023-12-07T11:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358181#M10824</link>
      <description>&lt;P&gt;Pls use:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Geoprocessing.MakeEnvironmentArray&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9386.html" target="_blank"&gt;https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9386.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are examples on that page&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 18:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358181#M10824</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2023-12-07T18:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358428#M10831</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;That is when you want to use the setting, but how do I change a setting and save it in the my project?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 07:03:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358428#M10831</guid>
      <dc:creator>pocalipse</dc:creator>
      <dc:date>2023-12-08T07:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358636#M10832</link>
      <description>&lt;P&gt;Gotcha. it's not supported. i'll take this as a new requirement for GP&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 16:57:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358636#M10832</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2023-12-08T16:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358672#M10834</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/73696"&gt;@pocalipse&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;is correct that there is not a way through the Pro .NET API to change or set Geoprocessing Environments for your project.&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/73696"&gt;@pocalipse&lt;/a&gt;&amp;nbsp;can you explain what your intention is for having an Add-in or Extension or other SDK element setting the project Geoprocessing environments?&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/145101"&gt;@CharlesMacleod&lt;/a&gt;&amp;nbsp;mentioned the MakeEnvironmentArray function, which you can use to set all of desired environment settings, then reuse that environment array for any tools you run using ExecuteToolAsync, so the effect can be quite similar to setting the environments to the project. For example (pseudo code)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var env = Geoprocessing.MakeEnvironmentArray(outputCoordinateSystem: a_spatial_reference, extent: an_extent_window);

Geoprocessing.ExecuteToolAsync(tool1, params1, env);
Geoprocessing.ExecuteToolAsync(tool2, params2, env);
Geoprocessing.ExecuteToolAsync(tool3, params3, env);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Maybe you have a different reason for setting the project's geoprocessing environments beyond their use for environments used in the tools you execute in an Add-in. Please let us know any details for this request.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this is the SDK Questions forum, and the question is answered that we do not have a function to set project environments in .NET, if you would like to submit an idea like "Update project's geoprocessing environments using .NET" to the ArcGIS Pro Ideas site, we can get comments from the user community and use that to try to prioritize this new development work.&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/idb-p/arcgis-pro-ideas" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-ideas/idb-p/arcgis-pro-ideas&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2023 17:50:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358672#M10834</guid>
      <dc:creator>DrewFlater</dc:creator>
      <dc:date>2023-12-08T17:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Update environment settings</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358961#M10835</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm currently building an add-in with a button, that create/build a project template. It is quite more advanced than what is possible with the buildin tools for project templates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the things I like to do is setting some of these global settings in hte environment settings so users don't have to do it themself and I throught that this would be the easy part of my button &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Dec 2023 06:34:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/update-environment-settings/m-p/1358961#M10835</guid>
      <dc:creator>pocalipse</dc:creator>
      <dc:date>2023-12-11T06:34:37Z</dc:date>
    </item>
  </channel>
</rss>

