ArcGIS Pro Add-In. Preventing geoprocessing output from being added to the ArcGIS Pro content panel

508
2
Jump to solution
02-11-2023 11:07 AM
PetrSTASTNY
New Contributor III

Hello,

I have created a Add-in (SDK Pro). It uses several geoprocessing commands and adds these outputs (layer, tables, feature layers) to the Contents panel in ArcGIS Pro. But that's what I don't want. I only need to update one feature class. I need to force the code in Visual Studio that the add-in is written in (C#) to not add intermediate layers etc to the Contents panel. Is there a command or setting to prevent this?

thank you, Petr

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Default geoprocessing ExecuteToolAsync method flag adds data to map and refreshes project items (GPExecuteToolFlags.AddOutputsToMap | GPExecuteToolFlags.RefreshProjectItems). Use flag GPExecuteToolFlags.None. More info here:

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9375.html 

 

View solution in original post

2 Replies
GKmieliauskas
Esri Regular Contributor

Hi,

Default geoprocessing ExecuteToolAsync method flag adds data to map and refreshes project items (GPExecuteToolFlags.AddOutputsToMap | GPExecuteToolFlags.RefreshProjectItems). Use flag GPExecuteToolFlags.None. More info here:

https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9375.html 

 

PetrSTASTNY
New Contributor III

Hi,

Thanks, that solved my problem exactly

Peter

0 Kudos