Tiled labels to annotation runtime error in script

460
3
Jump to solution
06-23-2021 02:09 PM
AliciaShyu
Occasional Contributor

I ran the Tiled Labels to Annotation tool in Pro and copy the python code to my script.

 

arcpy.TiledLabelsToAnnotation_cartography(AnnoMap, IndexGrid, GDB, "DesMoinesStreetAnno", "Anno", 3000, None,
                                          None, None, None, "STANDARD", "NOT_GENERATE_UNPLACED_ANNOTATION",
                                           "ALL_LAYERS", None, "NO_REQUIRE_ID", "AUTO_CREATE", "SHAPE_UPDATE",
                                           "FEATURE_CLASS_PER_FEATURE_LAYER", "NO_MERGE_LABEL_CLASS")

 

 

I'm getting a runtime error:

RuntimeError: Object: Error in executing tool

RuntimeError.png

I've tried searching the error but haven't come across a possible solution.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
AliciaShyu
Occasional Contributor

After @DanPatterson's input I was able to make it work. In a stand-alone script you only need the first 6 parameters

arcpy.TiledLabelsToAnnotation_cartography(AnnoMap, IndexGrid, GDB, "DesMoinesStreetAnno", "Anno", 3000)

 

 

View solution in original post

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

drop NO_MERGE_LABEL_CLASS

since you are using FEATURE_CLASS_PER_FEATURE_LAYER 

See the python example descriptions in Tiled Labels To Annotation (Cartography)—ArcGIS Pro | Documentation


... sort of retired...
0 Kudos
AliciaShyu
Occasional Contributor

After @DanPatterson's input I was able to make it work. In a stand-alone script you only need the first 6 parameters

arcpy.TiledLabelsToAnnotation_cartography(AnnoMap, IndexGrid, GDB, "DesMoinesStreetAnno", "Anno", 3000)

 

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

glad I could help... I think 


... sort of retired...