Hi,
How do you remove FeatureClass from file geodatabase programmatically using the ArcGIS Pro SDK?
Thank´s
Solved! Go to Solution.
DDL (data definition language) operations are not natively supported in the Pro SDK. You need to use the geoprocessing routines to run the "Delete" tool to delete the dataset.
I hope this helps,
--Rich
DDL (data definition language) operations are not natively supported in the Pro SDK. You need to use the geoprocessing routines to run the "Delete" tool to delete the dataset.
I hope this helps,
--Rich
Hi Rich,
Thank you for answering my question.
I'll give "Delete" tool a try.
There is a sample that deletes a table from a File Geodatabase: Edit Operation Row Event
You might be able to use this snippet from this sample:
QueuedTask.Run(async() =>
{
//find layer and derive geodatabase
var cpLayer = MapView.Active.Map.FindLayers("CrowdPlanning").FirstOrDefault() as FeatureLayer;
var geodatabase = cpLayer.GetFeatureClass().GetDatastore() as Geodatabase;
//Advise
//Delete the editlog table
var mva = Geoprocessing.MakeValueArray(geodatabase.GetPath().AbsolutePath,"EditLog");
await Geoprocessing.ExecuteToolAsync("Delete_management", mva);
});
Hi Wolfgang,
Thank you.
It's working perfectly.
Hi Wolf,
How do you remove WMTS layer using the ArcGIS Pro SDK?
Thank´s