Hi Dan - I'm not sure I'm clear on what you are describing. Maybe I have missed a link. The current workaround for the bug (creating a symbology parameter) isn't working in a Python Toolbox e.g.
def getParameterInfo(self):
# Spatial Data Layer
param0 = arcpy.Parameter(
displayName="Spatial Data Layer (SPATIALDATA_LYR)",
name ="SPATIALDATA_LYR",
datatype="GPFeatureLayer",
parameterType="Derived",
direction="Output")
param0.value = "SPATIALDATA_LYR"
param0.symbology = "C:\\Data\\7A_MAPPING\\\LayerFiles_Pro\\SMG_NAME.lyrx"
# SMG (line) Layer
param1 = arcpy.Parameter(
displayName="SMG_LINE_LYR",
name ="SMG_LINE_LYR",
datatype="GPFeatureLayer",
parameterType="Derived",
direction="Output")
param1.value = "SMG_LINE_LYR"
param1.symbology = os.path.join(SEVENA_LYRX_DIR, "SMG_NAME.lyrx") #set as a global var at the top of the script
The symbology field of the toolbox properties is empty. The script itself, which is just layer styling runs fine, but nothing is updated:
e.g.
CurrentProject = arcpy.mp.ArcGISProject("CURRENT")
CurrentMap = CurrentProject.listMaps()[0]
SD_SVCh_LYR = CurrentMap.listLayers("SD_SVCh_LYR")[0]
# Layer Styling----------------------
#https://community.esri.com/thread/198403-pro-20-bug-apply-symbology-from-layer-geoprocessing-tool#comment-706275
#https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDExOTkwNw==
messages.addMessage("Styling Layers")
arcpy.management.ApplySymbologyFromLayer(SMG_LINE_LYR, SMG_LYRX, None, "UPDATE")
TOP_10_LYR = CurrentMap.listLayers("TOP_10_LYR")[0]
arcpy.management.ApplySymbologyFromLayer(TOP_10_LYR, TOP10_LYRX, None, "UPDATE")
arcpy.management.ApplySymbologyFromLayer(OUTLIER_LYR, OUTLIER_LYRX, None, "UPDATE")
arcpy.management.ApplySymbologyFromLayer(SALE_USE_LYR, SALE_USE_LYRX, "VALUE_FIELD AllData_Sale_Use_GIS AllData_Sale_Use_GIS", "UPDATE")
arcpy.management.ApplySymbologyFromLayer(SD_LV_LYR, LV_LYRX)
SD_SVCh_LYR = CurrentMap.listLayers("SD_SVCh_LYR")[0]
arcpy.management.ApplySymbologyFromLayer(SD_SVCh_LYR, SVCh_LYRX)
I'm using a few different approaches in the script in case I hit on the right one but nothing is happening!!