Dim gps As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor Dim intersectme As ESRI.ArcGIS.AnalysisTools.Intersect Dim errmsg As String intersectme = New ESRI.ArcGIS.AnalysisTools.Intersect gps.SetEnvironmentValue("Extent", "MAXOF") Dim fcnames As String Dim pDataset As IDataset Dim pWorkspace As IWorkspace 'infcs() is an array of feature classes that I want to intersect 'the geoprocessing tool expects a semicolon delimited list of paths For i = 0 To UBound(infcs) - 2 pDataset = infcs(i) pWorkspace = pDataset.Workspace fcnames = fcnames & "'" & pWorkspace.PathName & "\" & pDataset.Name & ".shp'" & ";" Next pDataset = infcs(UBound(infcs) - 1) pWorkspace = pDataset.Workspace fcnames = fcnames & "'" & pWorkspace.PathName & "\" & pDataset.Name & ".shp'" intersectme.in_features = fcnames intersectme.out_feature_class = outfolder & "\" & prefix & "_" & "output" gps.Execute(intersectme, Nothing) errmsg = "" If gps.MessageCount > 0 Then For j = 0 To gps.MessageCount - 1 errmsg = errmsg & gps.GetMessage(j) & vbCrLf Next End If
if (GP.MessageCount > 0) { for (int Count = 0; Count <= GP.MessageCount - 1; Count++) { Console.WriteLine(GP.GetMessage(Count)); } }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.