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