平铺标签以注释脚本中的运行时错误

675
3.
跳到解决方案
06-23-2021下午02:09
AliciaShyu
通过
偶然的因素

我在Pro中运行了tile Labels to Annotation工具,并将python代码复制到我的脚本中。

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")

我得到一个运行时错误:

对象:执行工具时出错

RuntimeError.png

我试着搜索错误,但没有遇到一个可能的解决方案。

标签(2)
0荣誉
1解决方案

接受的解决方案
AliciaShyu
通过
偶然的因素

@DanPatterson我能让它工作。在独立脚本中,您只需要前6个参数

arcpy。TiledLabelsToAnnotation_cartography(AnnoMap, IndexGrid, GDB,“DesMoinesStreetAnno”,“Anno”,3000)

在原帖子中查看解决方案

0荣誉
3回复
DanPatterson
通过 MVP尊敬贡献者
MVP尊敬贡献者

下降NO_MERGE_LABEL_CLASS

既然你在使用FEATURE_CLASS_PER_FEATURE_LAYER

中的python示例描述平铺标签标注(制图)-ArcGIS Pro |文档


...有点退休了……
0荣誉
AliciaShyu
通过
偶然的因素

@DanPatterson我能让它工作。在独立脚本中,您只需要前6个参数

arcpy。TiledLabelsToAnnotation_cartography(AnnoMap, IndexGrid, GDB,“DesMoinesStreetAnno”,“Anno”,3000)

0荣誉
DanPatterson
通过 MVP尊敬贡献者
MVP尊敬贡献者

很高兴我能帮上忙……我认为


...有点退休了……