Geoprocessor object |
|
Release 9.3
Last modified January 19, 2010 |
Print all topics in : "Scripting object: Properties and Methods" |
Note:
This topic was updated for 9.3.1.
Scripting is the ability to use the geoprocessor functions from any number of current scripting environments, such as Python, VBScript, JScript, and Perl. A new ArcObjects component, the geoprocessor object, is the main vehicle for exposing the geoprocessing functions to the scripting languages. It is an object that provides a single access point and environment for the execution of any geoprocessing tool in ArcGIS, including extensions.
The geoprocessor object methods and properties are exposed for scripting and command line usage. They do not exist as tools in any toolbox.
For further information about scripting; its uses within a GIS; and which scripting language to use, as well as additional samples, see An overview of writing geoprocessing scripts.
Some methods and properties behave differently depending on whether a 9.2-version or 9.3-version geoprocessor is used. For a breakdown of the differences, see Differences between geoprocessor versions.
Learn more about the geoprocessor programming model
Expression | Explanation |
AddError | Adds a return message of severity = 2 to the queue. |
AddFieldDelimiters | Adds field delimiters to a field name to allow for use in SQL expressions. |
AddIDMessage | Adds an error or warning message complete with ID code. |
AddMessage | Adds a return message of severity = 0 to the queue. |
AddReturnMessage | Adds a message, from the function message queue, to the return queue. |
AddToolbox | Gets the specified toolbox and exposes its functionality. |
AddWarning | Adds a return message of severity = 1 to the queue. |
CheckExtension | Checks license availability of a specific type of extension. |
CheckInExtension | Returns the license to the License Manager so other applications can use it. |
CheckOutExtension | Retrieves the license for a specific type of extension. |
CheckProduct | Checks which desktop licenses are available. |
ClearEnvironment | Resets a specific environment setting to its default. |
Command | Parses the specified command line as a string. |
CopyParameter | Copies the selected parameter definition to the specified parameter list. |
CreateObject | Specifies the geoprocessor object model object to be created. |
CreateRandomValueGenerator | Returns an object that is used to create random values. |
CreateScratchName | Creates a scratch path name of the given data type. |
CreateUniqueName | Creates a unique name. |
Describe | Describes such properties as type, name, spatial reference, domains; versioning for DataElements such as FeatureClasses, Tables, GeoDatasets, CoverageFeatureClasses, Datasets, RelationshipClasses, Files, Layers, and Workspaces; as well as geoprocessing objects such as TableViews and FeatureLayers. |
Exists | Tests if the specified input exists and returns a Boolean value. |
Expression | Explanation |
GetInstallInfo | Returns a dictionary object of installation properties. |
GetMessage | Gets the specified message descriptions that were returned. |
GetMessages | Gets all message descriptions that were returned. |
GetParameter | Selects the specified parameter, by its index position, from the list of parameters. This method returns an object. |
GetParameterAsText | Selects the specified parameter, by its index position, from the list of parameters. This method returns a string. |
GetParameterCount | Returns the parameter count of a tool. |
GetParameterInfo | Returns a list of parameter objects for a tool. |
GetParameterValue | Returns a tool's parameter default value. |
GetReturnCode | For the specified message index, where the severity = 2, the error code is returned. |
GetSeverity | Returns the severity of the message of the given index (0 = ok, 1 = warning, 2 = error). |
GetSystemEnvironment | Gets the specified system environment variable. |
InsertCursor | Inserts rows into a table or feature class. |
IsSynchronous | Determines if a tool is synchronous or asynchronous. |
ListDatasets | Lists all datasets that fit the search criteria. Specifying search conditions (wildcard) and a feature type will limit the results. |
ListEnvironments | Lists all environment settings that fit the search criteria. Specifying search conditions (wildcard) will limit the results. |
ListFeatureClasses | Lists all feature classes from the selected workspace. Specifying search conditions (wildcard) and a feature type will limit the results. |
ListFields | List all the fields in the specified table, feature class, or shapefile. Specifying search conditions (wildcard) and a field type will limit the results. |
ListIndexes | List all the indexes in the specified table, feature class, or shapefile. Specifying search conditions (wildcard) will limit the results. |
ListInstallations | Returns a list object of the install types, suitable for use with GetInstallInfo. |
ListRasters | Lists all rasters from the selected workspace. Specifying search conditions (wildcard) and a feature type will limit the results. |
ListTables | Lists all tables from the selected workspace. Specifying search conditions (wildcard) and a table type will limit the results. |
ListToolboxes | Lists all toolboxes that fit the search criteria. Specifying search conditions (wildcard) will limit the results. |
ListTools | Lists all tools that fit the search criteria. Specifying search conditions (wildcard) will limit the results. |
ListWorkspaces | Lists any workspaces within the selected workspace. Specifying search conditions (wildcard) and a workspace type will limit the results. |
LoadSettings | Loads environment settings from an Extensible Markup Language (XML) environment settings file. |
Expression | Explanation |
MaxSeverity | Sets the maximum severity. |
MessageCount | Returns a numeric count of all the returned messages from the last executed command. |
OverWriteOutput | Allows or restricts the overwriting of existing outputs. |
ParameterCount | The number of parameters returned. |
ParseFieldName | Truncates a portion of the specified field name. |
ParseTableName | Truncates a portion of the specified table name. |
ProductInfo | Reports what the current product license is. |
QualifyFieldName | Prefixes a field name string with the <database>.<username> if required. |
QualifyTableName | Prefixes a table name string with the <database>.<username> if required. |
RemoveToolbox | Removes access to named toolbox for this current session. |
ResetEnvironments | Resets all environment settings to their default settings. |
ResetProgressor | Resets the progressor back to its initial settings. |
Expression | Explanation |
SaveSettings | Saves senvironment settings to an XML environment settings file. |
ScriptVersion | Returns the geoprocessor version based on the arcgisscripting.create() method. |
SearchCursor | Establishes a cursor for searching through field rows. |
SetParameter | Sets the specified parameter property using an object. The set parameter is selected from the existing parameter list by its index. |
SetParameterAsText | Sets the specified parameter property using a string. The set parameter is selected from the existing parameter list by its index. |
SetProduct | Defines the desktop license used by a script. |
SetProgressor | Establishes a progressor that allows information to be passed to a progress dialog box. |
SetProgressorLabel | Updates the progressor label. |
SetProgressorPosition | Updates the progressor position. |
TestSchemaLock | Tests if a schema lock can be acquired for a table, feature class, or feature dataset. A number of tools require a schema lock on the input data because they alter the data’s schema. The Add Field tool is an example of such a tool. If a tool requires a schema lock and it cannot acquire one at the time of execution, an appropriate error message is returned. The method does not actually apply the schema lock. |
Toolbox | Specifies the toolbox for the current geoprocessing session. |
UpdateCursor | Positionally updates and deletes rows in a table. |
Usage | Displays the syntax for the specified function. |
ValidateFieldName | Returns a valid field name based on name restrictions present in the output geodatabase. |
ValidateTableName | Returns a valid table name based on name restrictions present in the output geodatabase. |