Open Table of Contents

How to use ET GeoWizards functionality in .NET

Most of the functions of ET GeoWizards (starting from version 11.2) can be used in custom applications (stand alone, ArcGIS Add - Ins, custom controls).  The syntax of each ET GeoWizards function is described in the main topic of the function ==> .NET implementation. See also the utility functions for the .NET implementation.

Quick start - VB.NET example for stand alone application

Prerequisites

  1. Start Visual Studio

  2. Go to File ==> New ==> Project

  3. Go to Project ==> Properties ==> References:

  4. Save the Assembly and Build it.

  5. Create a button on your form and name it Build Thiessen

  6. Double click on the button to start editing the code

  7. Paste the code below

Imports ETGeoWizards112
Imports ESRI.ArcGIS.Geodatabase
Public Class Form1
  Private Sub PolylineToPoints_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PolylineToPoints.Click
    Try
      Dim et As New ETGWCore
      'set the full name of the input dataset.
      Dim sInputName As String = "c:\test\polylines.shp"
      'set the name for the output datset. It should not exist.
      Dim sOutName As String = "c:\test\vertices.shp"
      'get the feature class from the input name.
      Dim pInFC As IFeatureClass = et.FeatureClassFromPath(sInputName)
      'run the Polyline To Points function. See the topic in the user guide for description of the parameters and options available
      Dim pOutFC As IFeatureClass = et.PolylineToPoints(pInFC, sOutName, "Vertex")
      If Not pOutFC Is Nothing Then
        MsgBox("Vertices created!")
      Else
        MsgBox("Error! See log file for details.")
      End If
    Catch ex As Exception
      MsgBox(ex.Message)
    End Try
  End Sub
End Class

Note: Some of the functions will need two additional files located in the EXE folder. Find the following files in the installation folder of ET GeoWizards and copy them in the folder of your EXE

 

Copyright Ianko Tchoukanski