AnsweredAssumed Answered

geoprocessing in ArcGIS Add-In

Question asked by iaminsu12 on Nov 7, 2012
Latest reply on Nov 8, 2012 by iaminsu12

I implemented geoprocessor in add-in.
when I run this Add-in in ArcMap, the result of "result = gp.Execute("FeatureToLine_management", parameters, null);" is automatically added in current view as a new layer.

But I want to implement more geoprocessor, and make those results are not appeared at current view.

How can I do this?

I don't mean background running. I just want resulting featureclass is not appear at view.


namespace Convexpath_mk2 {     public class runConvexPath : ESRI.ArcGIS.Desktop.AddIns.Button     {         IGeoProcessor2 gp;         IGeoProcessorResult result;         IVariantArray parameters;                  public runConvexPath()         {             gp = new GeoProcessorClass();             parameters = new VarArrayClass();         }         protected override void OnClick()         {                          ConvexPathForm newForm = new ConvexPathForm();             newForm.Text = "Test";             newForm.ShowDialog();             Dictionary<string, string> fcDict = new Dictionary<string, string>();             fcDict = newForm.caDi();             string path = fcDict["path"];             gp.SetEnvironmentValue("workspace", path);             gp.OverwriteOutput = true;             List<string> oriList = new List<string>();             List<string> desList = new List<string>();             Dictionary<pair, pairData> pairDict = new Dictionary<pair, pairData>();             List<pair> pairList = new List<pair>();             Dictionary<string, string> belongDict;              FCUtils fcUtils = new FCUtils();              //Making Map boundary (polyline)              string strBoundaryline = "boundaryline";             parameters = new VarArrayClass();             parameters.Add(fcDict["fcBoundary"]);             parameters.Add(strBoundaryline);             result = gp.Execute("FeatureToLine_management", parameters, null);                          MessageBox.Show(result.GetMessages(0));       } }