Hi everybody
I am trying to make an add-in, that make some geoprocceing steps to a layer in toc:
1. Copy the layer
2. FeatureVerticesToPoints (if its a polygon or line)
3. Calculategeometry to get Z value
4. Calculate Field (to round up the calculation from the z value)
The last step is not working for me.
I am using this snippt:
var argsCalculateField = Geoprocessing.MakeValueArray(outfc, "zValue", "round($feature.zValue,2)", "ARCADE");
IGPResult resultCalculateField = await Geoprocessing.ExecuteToolAsync("managment.CalculateField", argsCalculateField);
if (resultCalculateField.IsFailed)
{ Geoprocessing.ShowMessageBox(resultCalculateField.Messages, "Content Header", GPMessageBoxStyle.Error);
}
In AGP it shows an error message, but whitout content:
In AGO I would to something like this:
Solved! Go to Solution.
Hi,
I think you have misspelling in your calculator tool name. In your code
managment.CalculateField
must be
management.CalculateField
Hi,
I think you have misspelling in your calculator tool name. In your code
managment.CalculateField
must be
management.CalculateField
OMG!
What a stupid mistake.
Thanks 🙂