The dialog for each function has a Help Tab that contains the full help topic for the current function.
All the functions of ET GeoWizards can be used in Python Scripts by calling ETGWRun.exe located in the installation folder of ET GeoWizards using the Subprocess Python module. ET GeoWizards 12 is a native 64-bit application, but since it runs in a separate process, it can be used from 32 and 64 bit Python.
Below is an example of using a function of ET GeoWizards within a Python script
Calling the script RotateShapes from Command Prompt python.exe RotateShapes.py "c:\00\aaaa.shp" "c:\00\aaaaRotated.shp" "45" "" "5" "5" |
import sys, subprocess argList = sys.argv print len(argList) if len(sys.argv) < 5: print "Usage:" , "RotateShapes <input_dataset> <output_dataset> <rotation_angle> {origin_point_dataset} {Origin_X} {Origin_Y}" else: etgwPath = r"C:\Program Files\ETSpatial Techniques\ETGeo Wizards\ETGWRun.exe" etFunction = "RotateShapes" inputDataset = argList[1] outputDataset = argList[2] rotation_angle = argList[3] origin_point_dataset = argList[4] Origin_X = "0" Origin_Y = "0" if len(sys.argv) >=6: Origin_X = argList[5] if len(sys.argv) >=7: Origin_Y = argList[6] print "Input: " , inputDataset print "Output: " , outputDataset retCode = subprocess.call([etgwPath, etFunction, inputDataset, outputDataset, rotation_angle, origin_point_dataset, Origin_X,Origin_Y]) if retCode == 0: print "Success" else: print retCode |
The location of ETGWRun.exe can be derived from the registry using: hKey = _winreg.OpenKey (_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\ETSpatial Techniques\ETGeo Wizards", 0, _winreg.KEY_READ|_winreg. KEY_WOW64_64KEY) myPath = _winreg.QueryValueEx(hKey, "InstallPath")[0] etgwPath = myPath+r"ETGWRun.exe" _winreg.CloseKey(hKey) |
The functionality of ET GeoWizards can be also used in custom .NET applications. See this topic for details
The functionality of ET GeoWizards can be executed directly from the DOS command prompt. Example:
ETGWRun.exe "RotateShapes" "c:\00\aaaa.shp" "c:\00\aaaaRotated.shp" "45" "" "5" "5"