laptop and a wrench

漏洞

Request for the documentation to add Python code for the LegendItem properties.

上次发布: January 19, 2022 ArcGIS Pro
漏洞 ID 编号 BUG-000143717
已提交October 15, 2021
上次修改时间June 5, 2024
适用范围ArcGIS Pro
找到的版本2.8.3
操作系统Windows OS
操作系统版本10.0 64 Bit
状态Will Not Be Addressed

附加信息

Python CIM access was made available specifically to provide finer grained access to properties not exposed in the managed API. Until we get enough requests for it, we will leave it as is. Another option to encourage other user's support, consider adding an IDEA to the Esri ideas page. See useful links below: https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm https://community.esri.com/t5/custom/page/page-id/arcgis-ideas

解决办法

Using Python CIM access as below:

aprx.listLayouts()[0]

lyt_cim = lyt.getDefinition("V2")

for item in lyt_cim.elements:

    if item.name == "Legend":

        for element in item.items:

            if element.name == "<layer>":

                element.showHeading = False

     element.showGroupLayerName = False

                element.showLayerName = False

lyt.setDefinition(lyt_cim)

重现步骤

漏洞 ID: BUG-000143717

软件:

  • ArcGIS Pro

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项