Add an argument to Exists function to limit existence test on one type

Idea created by aravazyesrifrance-fr-esridist Employee on Oct 1, 2018
    • Hornbydd
    • daroussin
    • lbecht@ocpa


    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,