The 'addLayerToGroup' python function adds the layer redundantly to the target group layer as well as in the Table Of Contents as a separate layer in ArcGIS Pro.
上次发布: February 18, 2019ArcGIS Pro
漏洞 ID 编号
BUG-000110978
已提交
January 20, 2018
上次修改时间
June 5, 2024
适用范围
ArcGIS Pro
找到的版本
2.1
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
This is being marked as designed. If you look at the code carefully, when calling m.addDataFromPath WITHIN addLayerToGroup, it is doing two things: First, adding a layer to the map AND also adding a layer to the group. The work around is to either add a layer to the map and then use MOVELAYER or reference a layer file. See code sample below#AddLayerToGroupm.addLayerToGroup(grpLyr, lyrFile, "TOP") #THIS DOES NOT DUPLICATEm.addLayerToGroup(grpLyr, m.addDataFromPath(FC), "TOP") #THIS DOES