How does one specify the Environments honored by a geoprocessing tool in a Python toolbox and have them show up in the Environments tab?

3111
22
02-22-2018 06:39 AM
JacquesBeaurain
New Contributor III

Example

This is for inside ArcGIS Pro but I assume it also applies to Desktop. I assume there is some way to advertise the environments in same way as the internal tools do but could not locate a single example or mention of it in the documentaion.

Thanks

22 Replies
TedHoward2
Esri Contributor

For anyone still trying to figure this out, you can control what Environment settings appear on the Environments tab in a Python Toolbox by editing the tool's xml metadata file adjacent to your pyt.

TedHoward2_0-1648074990933.pngTedHoward2_1-1648075019903.png

 

xingchenc
Occasional Contributor

Hi Ted,

        @TedHoward2 I am a little confused. In my case ,the XML file doesn't existed until I added the pyt file into my ArcGIS Pro (Catalog-Toolboxes-Add Toolbox). So how can this be preconfigured before I distribute the pyt file to my end user?

0 Kudos
TedHoward2
Esri Contributor

If the xml file exists in the same folder as the pyt, then it will be used when the toolbox is added to an ArcGIS Pro project. You must distribute both the pyt and any relevant xml files if you want the metadata help to be included for the end user.

0 Kudos