ExportCAD tool - Geoprocessor.Execute() crashing

Discussion created by salvador37 on Aug 29, 2011
Latest reply on Sep 1, 2011 by nahmed-esristaff
Hi everyone

The goal here is to export some features to CAD format. Using the tool window in ArcCatalog, it works perfectly. Programaically, it stops when calling Geoprocessor.Execute(). It doesn't go ahead and doesn't throw exceptions, just stop in that line, just like an Overflow.

I wonder if there is something about "Geoprocessor pGP" coming from Geoprocessor interface and "IGeoProcessorResult pResult" coming from Geoprocessing interface. I tried to set both to Geoprocessor, but unsuccessfully.

private void RunGP(ref ExportCAD pExportaCAD)
      Geoprocessor pGP;
      IGeoProcessorResult pResults = new GeoProcessorResultClass();
      object obj = Type.Missing;
        pGP = new Geoprocessor();
        pGP.OverwriteOutput = true;

        if (pGP.Exists(pExportaCAD.in_features, ref obj))
          pResults = (IGeoProcessorResult)pGP.Execute((IGPProcess)pExportaCAD, null); //stops here

Many thanks

Rodrigo Salvador