Max,
Thanks (again!) I appreciate your help. Unfortunately, I still am unable to apply the symbology from the .lyr file in code. This task has become a surprisingly frustrating obstacle.
Through my earlier testing, I had built a symbology fields var with the same syntax you provided. However, I assumed I had introduced some error into the bit I built and used the example you kindly provided. As usual, the following error wn:
{<msg code="800" type="100">ERROR 000800: The value is not a member of VALUE_FIELD | NORMALIZATION_FIELD | EXCLUSION_CLAUSE_FIELD | CHART_RENDERER_PIE_SIZE_FIELD | ROTATION_XEXPRESSION_FIELD | ROTATION_YEXPRESSION_FIELD | ROTATION_ZEXPRESSION_FIELD | TRANSPARENCY_EXPRESSION_FIELD | TRANSPARENCY_NORMALIZATION_FIELD | SIZE_EXPRESSION_FIELD | COLOR_EXPRESSION_FIELD | PRIMITIVE_OVERRIDE_EXPRESSION_FIELD.
ERROR 000309: The value is not a field
ERROR 000309: The value is not a field</msg>}
var inLayer = pDissFeatLayerTest.Name;
var inSymbologyLayer = strPathToLayerFile;
var symbologyFields = "[[\"VALUE_FIELD\", \"gridcode\", \"gridcode\"]]";
var parameters = Geoprocessing.MakeValueArray(inLayer,
inSymbologyLayer,
symbologyFields);
var gpResult = await Geoprocessing.ExecuteToolAsync("ApplySymbologyFromLayer_management",
parameters,
null,
CancelableProgressor.None,
GPExecuteToolFlags.Default);
I have placed breakpoints in the process to examine the values of the arguments. Everything appears in order. I examined the symbologyFields variable in code and it is producing what appears to be correct syntax:
[["VALUE_FIELD", "gridcode", "gridcode"]]
In code, prior to execution, I test for the existence of the .lyr file used in the inSymbologyLayer argument. So I know my path syntax is correct.
I am retrieving the feature layer in code and it is returning the valid feature layer for the inLayer argument.
I have included some screen shots from Pro. One shot shows the feature class table along with the ApplySymbologyFromLayer management tool. The second shot shows the successful results of the tool.
Any insight or suggestions would be appreciated.