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?

closed as off-topic by PolyGeo May 13 '18 at 1:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

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

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.