Greetings,
Arcpy function Exists determines the existence of the specified data object. Tests for the existence of feature classes, tables, datasets, shapefiles, workspaces, layers, and files.
Unfortunatly, when it returns "True", you cannot know which type of data object (feature classes or tables or datasets or shapefiles or workspaces or layers or files) has successfully validated the existence test.
There is a long time ago, in a very old software, there was an aml function Exists, which determined the existence of a specified data object regards to a type (Coverage, Workspace, etc...)
Cf :
[EXISTS <object> {-FILE | -ADDRESS | -ANNOTATIONS{.subclass} | -ARC | -ASCONNECT | -ASDATABASE | -ASDBMSTABLE <database> <connection> | -ASHISTORY {datetime} {<database> <connection>} | -ASHistoricalVIEW {-DBMSTABLE | -INFOTABLE | -LAYER} | -ASINFOTABLE | -ASLAYER | -ASLIBRARY | -CLEAN | -COVER | -DEFLAYER | -DIRECTORY | -GRID | -IMAGE | -INFO | -LAYER | -LIBRARY | -LINE | -LINK | -NETWORK | -NODE | -POINT | -POLYGON | -REGION{.subclass} | -ROUTE{.subclass} | -SECTION{.subclass} | -STACK | -TAT{.subclass} | -TIC | -TIN | -VAT | -WORKSPACE}]
It would be interesting and usefull for end user that arcpy.Exists function can be enhanced in order to get in argument one the tested type : feature classes or tables or datasets or shapefiles or workspaces or layers or files
Thank you to take this request in consideration about a function very usefull with Arc/Info and a bit truncated in Arcmap and ArcGIS Pro
Best regards,
Alain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.