All, arcpy.ListDatasets and I can�??t seem to agree. I want to list all CAD datasets in a folder and according to the help I should be able to use arcpy.ListDatasets with the �??CAD�?� keyword. If I write this, I get all my CAD data but also everything else:
import arcpy
from arcpy import env
env.workspace = "C:\\data"
datalist = arcpy.ListDatasets("*", "All")
for data in datalist:
print data
If I write the following code, nothing gets listed:
import arcpy
from arcpy import env
env.workspace = "C:\\data"
cadlist = arcpy.ListDatasets("*", "CAD")
for cad in cadlist:
print cad
In the �??Listing data�?� section it lists CAD as one of the keywords. (http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002z00000011000000.htm)But in the ListDatasets topic there is no mention of the CAD keyword. ( http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//000v0000001m000000.htm )For now, I get by with this, which isn't optimal. cadlist = arcpy.ListDatasets("*.dwg", "All")
Has anyone successfully used the CAD keyword and could you then help me out with what works? ESRI, I think the help section needs to be corrected. Thanks!