不具合
不具合 ID 番号 | BUG-000164466 |
---|---|
送信されました | January 21, 2024 |
最終更新日 | March 19, 2025 |
適用対象 | ArcGIS Pro |
見つかったバージョン | 3.1.3 |
オペレーティング システム | Windows OS |
オペレーティング システムのバージョン | 10.0 64 Bit |
ステータス | Will Not Be Addressed |
Code to take an input feature layer, where p0 is the text name of the feature layer, and update the symbology from the layer as fetched from the active map.
p0 = parameters[0].valueAsText # set p0 in the pyt p0 = arcpy.GetParameterAsText(0) #set p0 in the script tool, aprx = arcpy.mp.ArcGISProject('CURRENT') lyr = aprx.activeMap.listLayers(p0)[0] symb = lyr.symbology symb.updateRenderer('UniqueValueRenderer') symb.renderer.fields = ['LABEL'] lyr.symbology = symb.
Otherwise, for a script tool, create an output feature layer parameter that is derived from the input layer. In this scenario, p0 is set to p0 = arcpy.GetParameter(0) in the main function. Then, at the end of the execution, set the output parameter: sym = p0.symbology sym.updateRenderer('UniqueValueRenderer') sym.renderer.fields = ['LABEL'] p0.symbology = sym arcpy.SetParameter(1, p0)
不具合 ID: BUG-000164466
ソフトウェア:
ArcGIS エキスパートのサポートを受ける
Esri Support アプリのダウンロード