com.esri.arcgis.geoprocessing
Interface IGPFunction

All Superinterfaces:
Serializable
All Known Subinterfaces:
IGPFunction2
All Known Implementing Classes:
BaseGeoprocessingTool, ExportWebMap, FMEExportFunction, FMEImportFunction, GPConvertCacheStorageFormat, GPConvertCacheStorageFormatWorker, GPConvertMapServerCacheStorageFormat, GPCreateMapServerCache, GPDeleteGlobeCache, GPDeleteGlobeServerCache, GPDeleteMapServerCache, GPESRIAvailableFonts, GPExportCache, GPExportCacheWorker, GPExportMapServerCache, GPExportToKML, GPGenerateGlobeServerCache, GPGenerateMapServerCache, GPGenerateMapServerCacheTilingScheme, GPImportCache, GPImportCacheWorker, GPImportMapServerCache, GPIndexItems, GPKMLToLayer, GPLayersToKML, GPManageGlobeCache, GPManageGlobeCacheWorker, GPManageMapCacheScales, GPManageMapServerCacheTiles, GPMultipatchToCollada, GPReportCacheStatus, GPServerCachingCreateMapCache, GPServerCachingDeleteMapCache, GPServerCachingManageMapCacheTiles, GPServerCachingManageMapCacheTilesWorker, GPServerCachingValidateMapCacheTiles, GPServerCachingValidateMapCacheTilesWorker, GPSuggestDefaultScales, GPUpdateGlobeServerCache, GPUpdateGlobeServerCache2, GPUpdateMapServerCache, GPUpdateMapServerCacheScales, GPValidateMapServerCacheTiles, IGPFunction2Proxy, IGPFunctionProxy

public interface IGPFunction
extends Serializable

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

Superseded By

IGPFunction2

Remarks

To create a geoprocessing function tool requires the implementation of at least two objects: One is a function object that implements the IGPFunction interface; the other one is a function factory object that implements the IGPFunctionFactory interface. The IGPFunction interface provides access to properties and methods needed to build a function tool.

When To Use

IGPFunction is used to obtain access to the properties and methods required to build a function tool. For additional use information check the interface's individual properties and methods and the Building Geoprocessing Function Tools.

Product Availability

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

Supported Platforms

Windows


Method Summary
 void execute(IArray paramvalues, ITrackCancel trackcancel, IGPEnvironmentManager envMgr, IGPMessages message)
          Executes the geoprocessing function using the given array of parameter values.
 IUID getDialogCLSID()
          The class identifier (CLSID) of the custom dialog object to use when invoking the geoprocessing function.
 String getDisplayName()
          Displayed name of the geoprocessing function.
 IName getFullName()
          The function name object of the geoprocessing function.
 int getHelpContext()
          The context identifier of the topic within the help file for this function object.
 String getHelpFile()
          Name of the (CHM) file containing help information for this function object.
 String getMetadataFile()
          Name of the (XML) file containing the default metadata for this function object.
 String getName()
          Name of the geoprocessing function.
 IArray getParameterInfo()
          The list of parameters accepted by the geoprocessing function.
 Object getRenderer(IGPParameter pParam)
          Returns the custom renderer to use for the specified parameter.
 boolean isLicensed()
          Returns whether the geoprocessing function has all necessary licenses in order to execute.
 IGPMessages validate(IArray paramvalues, boolean updateValues, IGPEnvironmentManager envMgr)
          Validates the given array of parameter values.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
Name of the geoprocessing function.

Remarks

The Name property sets the name of a function tool. This name appears when using the function tool at the command line or in scripting. It must be unique within a given toolbox and must not contain any spaces.

Product Availability

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

Supported Platforms

Windows

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

getDisplayName

String getDisplayName()
                      throws IOException,
                             AutomationException
Displayed name of the geoprocessing function.

Remarks

The DisplayName property sets the user-friendly name of a function tool. It is displayed in the graphic user interface of the ArcToolbox window. The DisplayName can be internationalized.

Product Availability

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

Supported Platforms

Windows

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

getParameterInfo

IArray getParameterInfo()
                        throws IOException,
                               AutomationException
The list of parameters accepted by the geoprocessing function.

Remarks

The ParameterInfo property is the place where a function tool's parameters are defined. It returns an IArray of parameter objects (IGPParameter); these objects define the characteristics of the input and output parameters.

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.

getDialogCLSID

IUID getDialogCLSID()
                    throws IOException,
                           AutomationException
The class identifier (CLSID) of the custom dialog object to use when invoking the geoprocessing function.

Remarks

The DialogCLSID property is used to overwrite the default system tool dialog's look and feel. By default, Toolbox creates a dialog based upon the parameters returned by the ParameterInfo property.

Product Availability

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

Supported Platforms

Windows

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

getFullName

IName getFullName()
                  throws IOException,
                         AutomationException
The function name object of the geoprocessing function.

Remarks

The FullName property is the function name object for the GPFunction. It is created and returned by the GPFunctionFactory. The GPFunctionFactory must first be created before the FullName property can be implemented. Refer to IGPFunctionFactory for more detail.

Product Availability

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

Supported Platforms

Windows

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

getHelpFile

String getHelpFile()
                   throws IOException,
                          AutomationException
Name of the (CHM) file containing help information for this function object.

Remarks

The HelpFile porperty stores the path to a .chm file which contains a description of the tool parameters and explains the tool's operation and usage.

Product Availability

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

Supported Platforms

Windows

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

getHelpContext

int getHelpContext()
                   throws IOException,
                          AutomationException
The context identifier of the topic within the help file for this function object.

Remarks

The HelpContext property is a unique ID for the help topic from a HelpFile.

Product Availability

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

Supported Platforms

Windows

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

getMetadataFile

String getMetadataFile()
                       throws IOException,
                              AutomationException
Name of the (XML) file containing the default metadata for this function object.

Description

The MetadataFile property stores the name of a .xml file with the default metadata for a function tool. The .xml file supplies parameter descriptions in the help panel of a tool dialog. If no .chm file is provided through the HelpFile property, a tool's help is based on the .xml file's content.

Product Availability

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

Supported Platforms

Windows

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

isLicensed

boolean isLicensed()
                   throws IOException,
                          AutomationException
Returns whether the geoprocessing function has all necessary licenses in order to execute.

Remarks

The IsLicensed property is used to check if a function tool is licensed to execute in the active application.

Product Availability

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

Supported Platforms

Windows

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

getRenderer

Object getRenderer(IGPParameter pParam)
                   throws IOException,
                          AutomationException
Returns the custom renderer to use for the specified parameter.

Remarks

The GetRenderer property is used to set a custom renderer for a function tool's output.

Product Availability

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

Supported Platforms

Windows

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

validate

IGPMessages validate(IArray paramvalues,
                     boolean updateValues,
                     IGPEnvironmentManager envMgr)
                     throws IOException,
                            AutomationException
Validates the given array of parameter values.

Remarks

The Validate method checks that a function tool's set of parameter values are of the expected number, data type, and value.

Product Availability

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

Supported Platforms

Windows

Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
updateValues - The updateValues (in)
envMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IGPMessages
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

void execute(IArray paramvalues,
             ITrackCancel trackcancel,
             IGPEnvironmentManager envMgr,
             IGPMessages message)
             throws IOException,
                    AutomationException
Executes the geoprocessing function using the given array of parameter values.

Product Availability

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

Supported Platforms

Windows

Parameters:
paramvalues - A reference to a com.esri.arcgis.system.IArray (in)
trackcancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
envMgr - A reference to a com.esri.arcgis.geoprocessing.IGPEnvironmentManager (in)
message - 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.