' Create the geoprocessor. Dim gp As IGeoProcessor2 = New GeoProcessor() Dim pGPResult As IGeoProcessorResult = New GeoProcessorResult() gp.OverwriteOutput = True ' Create a variant array to hold the parameter values. Dim parameters As IVariantArray = New VarArray() Dim sev As Object = Nothing Try ' Populate the variant array with parameter values. With parameters .Add(sGPXFullName) .Add(sFDatasetPath & sTempFCName) End With ' Execute the tool. pGPResult = gp.Execute("GPXToFeatures_conversion", parameters, Nothing) ' Wait until the execution completes. While (pGPResult.Status = esriJobStatus.esriJobExecuting) Thread.Sleep(1000) End While ' Print geoprocessing messages. Console.WriteLine(gp.GetMessages(sev)) Catch ex As Exception ' Print generic exception messages. Console.WriteLine(ex.Message) ' Print geoprocessing execution error messages. Console.WriteLine(gp.GetMessages(sev)) End Try
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.