com.esri.arcgis.geoprocessing
Interface IGPUtilities2

All Superinterfaces:
IGPUtilities, Serializable
All Known Subinterfaces:
IGPUtilities3, IGPUtilities4
All Known Implementing Classes:
GPUtilities

public interface IGPUtilities2
extends IGPUtilities, Serializable

Provides access to the properties/methods of a geoprocessing utilities object.

Remarks

The IGPUtilities interface provides access to the GPUtilities object which contains many useful helper methods and properties to provide easier access to other ArcObjects.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 void abortEditOperation(IWorkspaceEdit pWorkspace)
          Abort edit operation within the application.
 void addToMapEx(IGPValue pGPValue, String name, boolean temporary, Object pUnkRenderer, boolean visible)
          Adds the given geoprocessing value object to the application display.
 void cleanupEditSession(boolean abort)
          Cleans up any edit session.
 void clearInMemoryWorkspace()
          Clear the virtual workspace.
 void createToolboxFromFactory(String alias, String location, String toolboxName)
          Creates a toolbox at the given location for a function factory of a given alias.
 void generateGeographicTransformDomain(Object iUnk, IGPCodedValueDomain pGTDomain, ISpatialReference pInSR, ISpatialReference pOutSR, IGPMessages pMessages)
          Generate the matching geographic transform domain from an input spatial reference to an output spatial reference.
 IActiveView getActiveView()
          Get active view.
 IBasicMap getBasicMap()
          Gets the basic map associated with the application.
 IEnvelope getExtent(IGPValue pValue, int[] envType)
          Gets the type and value of extent of the given value.
 ISpatialReference getGPSpRefEnvEx(IGPEnvironmentManager pEnvMgr, ISpatialReference pSrcSpRef, ISpatialReference pTgtSpRef, IEnvelope pNewExtent, double newMMin, double newMMax, double newZMin, double newZMax, Object pWkspFDS)
          Creates the spatial reference from both a source and environment.
 void getGTOperationSet(IGPValue pGTs, ISpatialReference pInSR, ISpatialReference pOutSR, ICompositeGeoTransformation ppGTs)
          Gets the set of geographic transformations.
 IWorkspace getInMemoryWorkspace()
          Get the virtual workspace.
 String getLayerName(IGPValue pValue, String name)
          Get default layer name for given value.
 IMap getMap()
          Gets the map associated with the application.
 IStatusBar getStatusBar()
          Gets the status bar associated with the application.
 IGPVariableManager getVariableManager()
          Sets the Variable Manager.
 boolean inApplication()
          Indicates if the program is running in an ArcGIS applicaiton.
 ILayer makeLayer(IGPValue pValue, String name, Object pUnkRenderer)
          Creates appropriate layer for the value.
 Object open(IGPValue pValue)
          Returns the dataset of the given value.
 Object openFromString(String nameString)
          Returns the dataset of the given value.
 void removeFromMapEx(IGPValue pGPValue)
          Removes the data/layers specified by the geoprocessing value object from the map.
 void removeInternalData()
          Removes all internal layers and tables.
 void saveLayer(String catalogPath, ILayer pLayer)
          Saves a layer to a given location on disk.
 void setInternalMap(IMap pMap)
          Sets the internal map used by the geoprocessor.
 void setupEditSession(IClass pTable)
          Starts an edit session if needed.
 void setVariableManagerByRef(IGPVariableManager ppVariableManager)
          Sets the Variable Manager.
 void startEditOperation(IWorkspaceEdit pWorkspace, boolean bHasPrivateEditSession)
          Start edit operation within the application.
 void stopEditOperation(IWorkspaceEdit pWorkspace, String operationLabel)
          Stop edit operation within the application.
 
Methods inherited from interface com.esri.arcgis.geoprocessing.IGPUtilities
addInternalLayer, addInternalLayer2, addInternalTable, addInternalTable2, addToMap, canAddToMap, compareWildCard, copy, createDataElement, createFeatureClassName, createFeatureLayer, createParameterValue, createParentFromCatalogPath, createRasterCatalogName, createRasterDatasetName, createTableName, decodeDETable, decodeFeatureLayer, decodeLayer, decodeRaster, decodeRasterLayer, decodeStandaloneTable, decodeTableView, delete, exists, expandDataElement, exportFeatureClass, fieldExists, findField, findMapLayer, findMapLayer2, findMapTable, findMapTable2, generateDefaultOutputValue, generateSpRef, getCatalog, getEnvironment, getFields, getGPLayers, getGPMapData, getGPSpRefEnv, getGPTableViews, getGxObject, getGxObjectFromLocation, getGxObjects, getMapLayers, getMapTables, getNameObject, getNameObjectFromLocation, getUnQualifiedCatalogPath, getWorkspace, internalValidate, internalValidateValue, isBadMessage, isDatasetType, isDerived, isGPTableView, isRefreshCatalogParent, makeDataElement, makeDataElementFromNameObject, makeDataElements, makeGPLayer, makeGPLayerFromLayer, makeGPTableView, makeGPTableViewFromTable, makeGPValueFromObject, openDataset, openDatasetFromLocation, openFeatureClassFromString, openFeatureLayerFromString, openRasterDatasetFromString, openRasterLayerFromString, openTableFromString, packGPValue, qualifyOutputCatalogPath, qualifyOutputDataElement, refreshCatalog, refreshView, releaseInternals, removeFromMap, removeInternalLayer, removeInternalLayerEx, removeInternalTable, removeInternalTableEx, removeInternalValues, rename, setGridIndex, setRefreshCatalogParent, setWorkspace, unpackGPValue, validateExists
 

Method Detail

open

Object open(IGPValue pValue)
            throws IOException,
                   AutomationException
Returns the dataset of the given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveLayer

void saveLayer(String catalogPath,
               ILayer pLayer)
               throws IOException,
                      AutomationException
Saves a layer to a given location on disk.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
catalogPath - The catalogPath (in)
pLayer - A reference to a com.esri.arcgis.carto.ILayer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getActiveView

IActiveView getActiveView()
                          throws IOException,
                                 AutomationException
Get active view.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.carto.IActiveView
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMap

IMap getMap()
            throws IOException,
                   AutomationException
Gets the map associated with the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.carto.IMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBasicMap

IBasicMap getBasicMap()
                      throws IOException,
                             AutomationException
Gets the basic map associated with the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.carto.IBasicMap
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

inApplication

boolean inApplication()
                      throws IOException,
                             AutomationException
Indicates if the program is running in an ArcGIS applicaiton.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
The pInApplication
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

makeLayer

ILayer makeLayer(IGPValue pValue,
                 String name,
                 Object pUnkRenderer)
                 throws IOException,
                        AutomationException
Creates appropriate layer for the value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
name - The name (in)
pUnkRenderer - A reference to another Object (IUnknown) (in)
Returns:
A reference to a com.esri.arcgis.carto.ILayer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStatusBar

IStatusBar getStatusBar()
                        throws IOException,
                               AutomationException
Gets the status bar associated with the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.system.IStatusBar
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startEditOperation

void startEditOperation(IWorkspaceEdit pWorkspace,
                        boolean bHasPrivateEditSession)
                        throws IOException,
                               AutomationException
Start edit operation within the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspaceEdit (in)
bHasPrivateEditSession - The bHasPrivateEditSession (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

abortEditOperation

void abortEditOperation(IWorkspaceEdit pWorkspace)
                        throws IOException,
                               AutomationException
Abort edit operation within the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspaceEdit (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stopEditOperation

void stopEditOperation(IWorkspaceEdit pWorkspace,
                       String operationLabel)
                       throws IOException,
                              AutomationException
Stop edit operation within the application.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspaceEdit (in)
operationLabel - The operationLabel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setVariableManagerByRef

void setVariableManagerByRef(IGPVariableManager ppVariableManager)
                             throws IOException,
                                    AutomationException
Sets the Variable Manager.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
ppVariableManager - A reference to a com.esri.arcgis.geoprocessing.IGPVariableManager (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getVariableManager

IGPVariableManager getVariableManager()
                                      throws IOException,
                                             AutomationException
Sets the Variable Manager.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPVariableManager
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

generateGeographicTransformDomain

void generateGeographicTransformDomain(Object iUnk,
                                       IGPCodedValueDomain pGTDomain,
                                       ISpatialReference pInSR,
                                       ISpatialReference pOutSR,
                                       IGPMessages pMessages)
                                       throws IOException,
                                              AutomationException
Generate the matching geographic transform domain from an input spatial reference to an output spatial reference.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
iUnk - A reference to another Object (IUnknown) (in)
pGTDomain - A reference to a com.esri.arcgis.geodatabase.IGPCodedValueDomain (in)
pInSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pOutSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pMessages - A reference to a com.esri.arcgis.geodatabase.IGPMessages (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGTOperationSet

void getGTOperationSet(IGPValue pGTs,
                       ISpatialReference pInSR,
                       ISpatialReference pOutSR,
                       ICompositeGeoTransformation ppGTs)
                       throws IOException,
                              AutomationException
Gets the set of geographic transformations.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pGTs - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
pInSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pOutSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
ppGTs - A reference to a com.esri.arcgis.geometry.ICompositeGeoTransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

IEnvelope getExtent(IGPValue pValue,
                    int[] envType)
                    throws IOException,
                           AutomationException
Gets the type and value of extent of the given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
envType - A com.esri.arcgis.geoprocessing.esriGPExtentEnum constant (out: use single element array)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getGPSpRefEnvEx

ISpatialReference getGPSpRefEnvEx(IGPEnvironmentManager pEnvMgr,
                                  ISpatialReference pSrcSpRef,
                                  ISpatialReference pTgtSpRef,
                                  IEnvelope pNewExtent,
                                  double newMMin,
                                  double newMMax,
                                  double newZMin,
                                  double newZMax,
                                  Object pWkspFDS)
                                  throws IOException,
                                         AutomationException
Creates the spatial reference from both a source and environment.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pEnvMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
pSrcSpRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pTgtSpRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pNewExtent - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
newMMin - The newMMin (in)
newMMax - The newMMax (in)
newZMin - The newZMin (in)
newZMax - The newZMax (in)
pWkspFDS - A reference to another Object (IUnknown) (in)
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createToolboxFromFactory

void createToolboxFromFactory(String alias,
                              String location,
                              String toolboxName)
                              throws IOException,
                                     AutomationException
Creates a toolbox at the given location for a function factory of a given alias.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
alias - The alias (in)
location - The location (in)
toolboxName - The toolboxName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInternalMap

void setInternalMap(IMap pMap)
                    throws IOException,
                           AutomationException
Sets the internal map used by the geoprocessor.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pMap - A reference to a com.esri.arcgis.carto.IMap (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLayerName

String getLayerName(IGPValue pValue,
                    String name)
                    throws IOException,
                           AutomationException
Get default layer name for given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
name - The name (in)
Returns:
The pName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeInternalData

void removeInternalData()
                        throws IOException,
                               AutomationException
Removes all internal layers and tables.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInMemoryWorkspace

IWorkspace getInMemoryWorkspace()
                                throws IOException,
                                       AutomationException
Get the virtual workspace.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearInMemoryWorkspace

void clearInMemoryWorkspace()
                            throws IOException,
                                   AutomationException
Clear the virtual workspace.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openFromString

Object openFromString(String nameString)
                      throws IOException,
                             AutomationException
Returns the dataset of the given value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
nameString - The nameString (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setupEditSession

void setupEditSession(IClass pTable)
                      throws IOException,
                             AutomationException
Starts an edit session if needed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pTable - A reference to a com.esri.arcgis.geodatabase.IClass (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

cleanupEditSession

void cleanupEditSession(boolean abort)
                        throws IOException,
                               AutomationException
Cleans up any edit session.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
abort - The abort (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

removeFromMapEx

void removeFromMapEx(IGPValue pGPValue)
                     throws IOException,
                            AutomationException
Removes the data/layers specified by the geoprocessing value object from the map.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pGPValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addToMapEx

void addToMapEx(IGPValue pGPValue,
                String name,
                boolean temporary,
                Object pUnkRenderer,
                boolean visible)
                throws IOException,
                       AutomationException
Adds the given geoprocessing value object to the application display.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Parameters:
pGPValue - A reference to a com.esri.arcgis.geodatabase.IGPValue (in)
name - The name (in)
temporary - The temporary (in)
pUnkRenderer - A reference to another Object (IUnknown) (in)
visible - The visible (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.