-1

Composing a map using query layers in ArcGIS 10.4.1 (Basic) the final step is to backup the data used when the map is finalised. Exporting manually is straight forward. But using the conversion tool results in ERROR 999999. Using arcpy as elaborated in https://geonet.esri.com/thread/66389#comment-303614 produces on the help and syntax window in short:
ERROR 000210: (...) No support for this geometry type. Error executing FeatureClassToFeatureClass (...).
(in original:
Ausführung von: FeatureClassToFeatureClass GPL0 D:\test "name of the layer".shp # "CITY "CITY" true true false 100 Text 0 0 ,First,#,GPL0,CITY,-1,-1" # Startzeit: Tue Jan 17 07:25:20 2017 ERROR 000210: Ausgabe D:\test\"name of the layer".shp kann nicht erstellt werden. No support for this geometry type. Fehler beim Ausführen von (FeatureClassToFeatureClass). Fehlgeschlagen am Tue Jan 17 07:25:20 2017 (Verstrichene Zeit: 0,02 Sekunden) )
the primary prompt shows:
Runtime error Traceback (most recent call last): File "", line 5, in File "c:\software\arcgis\desktop10.4\arcpy\arcpy\conversion.py", line 1694, in FeatureClassToFeatureClass raise e ExecuteError: ERROR 000210: Ausgabe D:\test\"name of the layer".shp kann nicht erstellt werden. Fehler beim Ausführen von (FeatureClassToFeatureClass).

import arcpy
mxd = arcpy.mapping.MapDocument("current")
df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0]
count = 0 
for lyr in arcpy.mapping.ListLayers(mxd, "", df):
  if count < 20:
    count +=1
    name = lyr.name
    arcpy.FeatureClassToFeatureClass_conversion(lyr, r"D:\test", name + ".shp")

Querying for the geometry type via: select distinct a.geom.SDO_GTYPE from "name of the original table" a results in: 2001 (The 2 indicates two-dimensional, and the 1 indicates a single point.)

A successful export not explicitly for query layers is also discussed here. Checking the layer properties source within ArcMap reveals the Data Type of Query Feature Class.

How would one be able to export then this type using arcpy?

1
  • 1
    What is the full error message including line number that you receive when running the precise code snippet that you have presented?
    – PolyGeo
    Commented Jan 14, 2017 at 20:45

1 Answer 1

-1

Export via arcpy is feasable using the toolbox mechanism: when the code presented is deployed and executed that way, the wanted shapefiles are produced in folder D:\test.
Result message is:
Ausführung von: export Startzeit: Tue Jan 17 08:40:36 2017 Skript export wird ausgeführt... Completed script export... Erfolgreich am Tue Jan 17 08:40:36 2017 (Verstrichene Zeit: 0,06 Sekunden)

Not the answer you're looking for? Browse other questions tagged or ask your own question.