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
ArcGIS - installed and licensed
ArcObjects SDK for NET Framework - installed
Microsoft Visual Studio
ET GeoWizards 11.2 and above - installed and registered
Start Visual Studio
Go to File ==> New ==> Project
In the dialog go to Installed Templates ==> Visual Basic ==> ArcGIS ==> Extending ArcObjects and select Windows Application (Desktop)
Give a name to your project and click OK
In the ArcGIS Project Wizards that will open select your product (Basic, Standard or Advanced) and click Finish
Go to Project ==> Properties ==> References:
Add reference ==> .NET ==> find ESRI.ArcGIS.Geodatabase and select it ==> Click OK
Add reference ==> Browse ==> navigate to the installation folder of ET GeoWizards and select ETGeoWizards112.dll. Make sure that "Copy Local" is set to true in the reference properties.
Save the Assembly and Build it.
Create a button on your form and name it Build Thiessen
Double click on the button to start editing the code
Paste the code below
Public Class Form1
Private Sub PolylineToPoints_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PolylineToPoints.Click
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("Error! See log file for details.")
Catch ex As Exception
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|