0

I'd write python script that execute TiledLabelsToAnnotation_cartography tool. This script is call by a tbx file.

No problem when i launch my python script in Visual Studio Code, result is correct. Now, i need to valid my script in ArcMap to share my geoprocessing as web service .sd file (arcgis server). But arcmap ignore TiledLabelsToAnnotation_cartography tool and break my script... So, layers generated by this function missing and i have failed execution because i need this layers to realize a clip.

/!\ Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset C:\Users...\scratch.gdb\LAYER_XXX_SEP150 does not exist or is not supported

Already try :

  • realize TiledLabelsToAnnotation_cartography execution with python geoprocessing window with same parameters = excecution success.
  • Manually import missing layers in gdb = execution success.

Why arcmap ignore this function ?

Code :

\# Entry : MXD_ETQ contain labels layers 
MXD_ETQ = arcpy.mapping.MapDocument(path)

\#copy MXD to preserve original MXD from additionnal annotation layers
MXD_copy_path  = os.path.join(temp_folder, "_labels")
MXD_ETQ.saveACopy(MXD_copy_path)

\#tiled labels to annotation ---> Ignored by ArcMap
arcpy.TiledLabelsToAnnotation_cartography(
        MXD_copy_path, df_name , EXTENT_LAYER , TEMP_GDB , "ETQ", "SEP", 150, 
        "", "", "", "", "STANDARD", "NOT_GENERATE_UNPLACED_ANNOTATION")
  • Can you present a code snippet that we can use to try and reproduce this, please? – PolyGeo Apr 11 '18 at 11:37
  • i can't write all the code, just concern part. – Gaet Apr 11 '18 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.