Geoprocessor object |
|
Release 9.2
Last modified November 7, 2007 |
![]() ![]() ![]() Print all topics in : "Scripting object: Properties and Methods" |
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, will be 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 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, which scripting language to use, as well as additional samples, see An overview of writing geoprocessing scripts.
Learn more about the geoprocessor programming model
Expression | Explanation |
AddError | Adds a return message of severity=2 to the queue. |
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 pathname 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, 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 |
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. |
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 | Insert rows into a table or feature class. This method will return a Dispatch enumeration object that will, in turn, hand out Dispatch row objects. |
IsSynchronous |
|
ListDatasets | Lists all datasets that fit the search criteria. Specifying search conditions (wild card) and a feature type will limit the results. |
ListEnvironments | Lists all environment settings that fit the search criteria. Specifying search conditions (wild card) will limit the results. |
ListFeatureClasses | Lists all feature classes from the selected workspace. Specifying search conditions (wild card) and a feature type will limit the results. |
ListFields | List all the fields in the specified table, feature class, or shapefile. Specifying search conditions (wild card) and a field type will limit the results. |
ListIndexes | List all the indexes in the specified table, feature class, or shapefile. Specifying search conditions (wild card) will limit the results. |
ListRasters | Lists all rasters from the selected workspace. Specifying search conditions (wild card) and a feature type will limit the results. |
ListTables | Lists all tables from the selected workspace. Specifying search conditions (wild card) and a table type will limit the results. |
ListToolboxes | Lists all toolboxes that fit the search criteria. Specifying search conditions (wild card) will limit the results. |
ListTools | Lists all tools that fit the search criteria. Specifying search conditions (wild card) will limit the results. |
ListWorkspaces | Lists any workspaces within the selected workspace. Specifying search conditions (wild card) and a workspace type will limit the results. |
LoadSettings | Load environment settings from an 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. |
RefreshCatalog | Refreshes ArcCatalog's catalog tree. |
RemoveToolbox | Removes access to named toolbox for this current session. |
ResetEnvironments | Resets all environment settings to their default settings. |
Expression | Explanation |
SaveSettings | Save senvironment settings to an XML environment settings file. |
SearchCursor | Establishes a cursor for searching through field rows. This method will return a Dispatch enumeration object that will, in turn, hand out Dispatch row objects. |
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. |
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 update and delete 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. |