Hi Uma,
Thank you for your response. My apologies, I realize that I am very late on getting back to looking into this...
So I tried something similar to what you suggested, with the following code:
return QueuedTask.Run(() =>
{
var sf = SpatialReferenceBuilder.CreateSpatialReference(3419);
var point = MapPointBuilder.CreateMapPoint(2260034.44, 235444.97, sf);
var op = new EditOperation();
op.Create(layer, point);
if (!op.Execute())
{
errors = op.ErrorMessage;
}
});
And the EditOperation returns this error message: "Edit operation failed.". Additionally, I notice that if I try to create any features in my in-memory layer through the ArcGIS Pro editing UI, I get this error message:
Here is a code snippet of how I am creating the layer in-memory:
return QueuedTask.Run(() =>
{
errorMessages = string.Empty;
var parameters = Geoprocessing.MakeValueArray("memory", layerName, "POINT", "", "", "", 3419);
var result = Geoprocessing.ExecuteToolAsync("management.CreateFeatureClass", parameters, null, null, null, GPExecuteToolFlags.AddOutputsToMap);
if (result.Result.ErrorMessages.Count() > 0)
{
foreach (var item in result.Result.ErrorMessages)
{
errorMessages += $"{item.Text}{Environment.NewLine}";
}
errorMessages = errorMessages.TrimEnd();
}
});
Is it possible that I'm doing something wrong with how I am creating this layer?
Thanks,
Greg