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
I've tried searching the error but haven't come across a possible solution.
Solved! Go to Solution.
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)
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
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)
glad I could help... I think