com.esri.arcgis.geoprocessing
Interface IGPEnvironmentManager

All Superinterfaces:
Serializable
All Known Implementing Classes:
GPEnvironmentManager

public interface IGPEnvironmentManager
extends Serializable

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

When To Use

The IGPEnvironmentManager interface provides access to the properties and method of the GPEnvironmentManager object. The GPEnvironmentManager is the managing object for all environments and settings used by the Geoprocessor and its tools. It is passed to each tool for use during Validate() and Execute().

Product Availability

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

Supported Platforms

Windows


Method Summary
 void addEnvironment(IGPEnvironment env)
          Adds the given geoprocessing environment to the environment manager.
 IGPEnvironment findEnvironment(String name)
          Locates and returns the environment with the specified name.
 IArray getEnvironments()
          Returns the environments of the environment manager as an array.
 Object getEnvVariant(IGPEnvironment env)
          Returns the value of the given environment as a variant.
 IArray getLocalEnvironments()
          Returns an array of the environments that have been updated locally.
 IGPEnvironmentManager getParent()
          Returns the parent environment manager.
 void putEnvVariant(IGPEnvironment env, Object value)
          Sets the value of the given environment to the given variant.
 void removeEnvironment(IGPEnvironment env)
          Removes the given geoprocessing environment from the environment manager.
 void removeEnvironments()
          Removes all environments from the environment manager.
 void setParentByRef(IGPEnvironmentManager parent)
          Returns the parent environment manager.
 void setPersistAll(boolean rhs1)
          Indicates whether all environments or only local environments are persisted.
 void substituteEnvironments(IArray pParams)
          Substitues the values of the given array of parameters with the current environment values.
 

Method Detail

getParent

IGPEnvironmentManager getParent()
                                throws IOException,
                                       AutomationException
Returns the parent environment manager.

Remarks

The Parent property returns a reference to the root environment manager, i.e., ArcToolbox.

Product Availability

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

Supported Platforms

Windows

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

setParentByRef

void setParentByRef(IGPEnvironmentManager parent)
                    throws IOException,
                           AutomationException
Returns the parent environment manager.

Product Availability

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

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

addEnvironment

void addEnvironment(IGPEnvironment env)
                    throws IOException,
                           AutomationException
Adds the given geoprocessing environment to the environment manager.

Remarks

The AddEnvironment methods adds a given environment to the environments array.

Product Availability

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

Supported Platforms

Windows

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

removeEnvironment

void removeEnvironment(IGPEnvironment env)
                       throws IOException,
                              AutomationException
Removes the given geoprocessing environment from the environment manager.

Product Availability

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

Supported Platforms

Windows

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

substituteEnvironments

void substituteEnvironments(IArray pParams)
                            throws IOException,
                                   AutomationException
Substitues the values of the given array of parameters with the current environment values.

Product Availability

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

Supported Platforms

Windows

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

removeEnvironments

void removeEnvironments()
                        throws IOException,
                               AutomationException
Removes all environments from the environment manager.

Product Availability

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

Supported Platforms

Windows

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

getEnvironments

IArray getEnvironments()
                       throws IOException,
                              AutomationException
Returns the environments of the environment manager as an array.

Remarks

The GetEnvironments method returns all possible environments of an environment manager as an array. Use this method to access a complete environments list of a GPEnviornmentManager object.

Product Availability

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

Supported Platforms

Windows

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

getLocalEnvironments

IArray getLocalEnvironments()
                            throws IOException,
                                   AutomationException
Returns an array of the environments that have been updated locally.

Remarks

The GetLocalEnvironments method returns the environments [as an IArray object] defined for an object such as a model process or a model.

Product Availability

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

Supported Platforms

Windows

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

findEnvironment

IGPEnvironment findEnvironment(String name)
                               throws IOException,
                                      AutomationException
Locates and returns the environment with the specified name.

Remarks

The FindEnvironment method returns the specified environment as string. Use this method to access a specific environment.

A code snippet on how to use this method is included below.

Product Availability

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

Supported Platforms

Windows

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

putEnvVariant

void putEnvVariant(IGPEnvironment env,
                   Object value)
                   throws IOException,
                          AutomationException
Sets the value of the given environment to the given variant.

Product Availability

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

Supported Platforms

Windows

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

getEnvVariant

Object getEnvVariant(IGPEnvironment env)
                     throws IOException,
                            AutomationException
Returns the value of the given environment as a variant.

Product Availability

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

Supported Platforms

Windows

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

setPersistAll

void setPersistAll(boolean rhs1)
                   throws IOException,
                          AutomationException
Indicates whether all environments or only local environments are persisted.

Product Availability

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

Supported Platforms

Windows

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