Search the Community
Showing results for tags 'array'.
Found 1 result
A big hello, can somebody help me please? I want to to use an arry to create 3 buffers with different distances. Mainly the code should produce 3 buffer files in one step. The code below runs after I use Arcgis Add-in but I have no imagination how to build in the arry and let save this 3 buffer files. Can somebody point me please in right direction as I have no idea where to start? My system is ArcGis10.2, VB.net, Visual Studio2012 Thanks a lot in advance!!! This is the code I want to modify: Imports ESRI.ArcGIS.Geoprocessor Imports ESRI.ArcGIS.Framework Imports ESRI.ArcGIS.Carto Imports ESRI.ArcGIS.ArcMapUI Imports ESRI.ArcGIS.AnalysisTools Public Class BufferButton1 Inherits ESRI.ArcGIS.Desktop.AddIns.Button Public Sub New() End Sub Protected Overrides Sub OnClick() Dim m_application = My.ArcMap.Application Dim mxDocument As IMxDocument = m_application.Document Dim map As IMap = mxDocument.FocusMap Dim strInputFC As String Dim strOutputFC As String Dim intOutputBufferSize As Integer Dim gp As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor() gp.OverwriteOutput = 1 strInputFC = map.Layer(0).Name strOutputFC = "E:\" ' in this path I would like to save the 3 buffer files intOutputBufferSize = 1000 ' here I would like to handle three buffer sizes eg 1000, 2000 and 3000 Dim bufferTool As ESRI.ArcGIS.AnalysisTools.Buffer = New ESRI.ArcGIS.AnalysisTools.Buffer() bufferTool.in_features = strInputFC bufferTool.out_feature_class = strOutputFC bufferTool.buffer_distance_or_field = intOutputBufferSize gp.Execute(bufferTool, Nothing) My.ArcMap.Application.CurrentTool = Nothing End Sub Protected Overrides Sub OnUpdate() Enabled = My.ArcMap.Application IsNot Nothing End Sub End Class