laptop and a wrench

不具合

The ArcPy map layer list in ArcGIS Pro is not updated when a layer is returned as an output parameter of a script.

最後に公開された状態: August 15, 2017 ArcGIS Pro
不具合 ID 番号 BUG-000105415
送信されましたMay 26, 2017
最終更新日June 5, 2024
適用対象ArcGIS Pro
見つかったバージョン1.4
オペレーティング システムWindows OS
オペレーティング システムのバージョン7
ステータスKnown Limit

参考情報

for lyr in m.listLayers (): #get layer object if lyr.name == inLyr: arcpy.AddMessage ("found lyr in map") inLyrPath = os.path.dirname (lyr.dataSource) outLyr = os.path.join (inLyrPath, outLyrName) arcpy.AddMessage ("full path to outLyr: " + outLyr) arcpy.CopyFeatures_management (inLyr, outLyr) arcpy.AddMessage ("after CopyFeatures") arcpy.SetParameterAsText (2, outLyr) #push layer out to map arcpy.AddMessage ("after SetParameterAsText") break; p = arcpy.mp.ArcGISProject ("CURRENT") #get current project m = p.listMaps () [0] #get first map in project m.addDataFromPath(outLyr) for lyr in m.listLayers (): arcpy.AddMessage ("lyr.name: " + lyr.name)

対処法

Perform any task requiring access to the new layer before exiting the loop where the layer object is current. For instance, use the MakeFeatureLayer to create a layer object and return that object to the map instead of returning the new layer 'as text.' That way the layer object can be updated, such as by applying symbology from the existing layer from which it was copied.

再現の手順

不具合 ID: BUG-000105415

ソフトウェア:

  • ArcGIS Pro

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動