Show Navigation | Hide Navigation
You are here:
Geoprocessing > Automating your work with scripts > Scripting object: Properties and Methods > Properties and Methods

Exists method

Release 9.3
Last modified January 19, 2010
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"


Related Topics

Note: This topic was updated for 9.3.1.

Determines the existence of the specified data object

Tests for the existence of feature classes, shapefiles, datasets, geodatabases, layers, tables, workspaces, or files in the current workspace or specified location. If the element exists, a value of true is returned.

Syntax


object.Exists(InputValue As String) As Boolean

Part Description
object The instantiated geoprocessing object
InputValue The name, path, or both, of the feature class, dataset, shapefile, geodatabase, layer, table, workspace, or file whose existence is being tested


Examples



import arcgisscripting
gp = arcgisscripting.create(9.3)

gp.Workspace = "D:/St_Johns/data.mdb"

# Clip roads feature class if it exists.
#
fc = "D:/St_Johns/data.mdb/roads"
if gp.Exists(fc):
    gp.clip_analysis(fc, "urban_area", "urban_roads)


Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.