I'm adding a feature class to file geodb using :
GPExecuteToolFlags flags = GPExecuteToolFlags.None;
IGPResult result = await Geoprocessing.ExecuteToolAsync("CreateFeatureclass_management", Geoprocessing.MakeValueArray(arguments.ToArray()),null,null,null, flags);
Q1) : It still seems to also add to the current map - what flag do i need to set to prevent that ?
Q2 ) How can i remove that feature class programmatically from the the geodb ? i cannot find any mention of something like Delete/RemoveFeatureclass_management
Thanks.
There is a single tool used to delete objects from the database:
Thanks Curtis - anyone seen a .net equivalent ? I couldn't find any docco/example.
I imagine something like below, but I can't work out how to specify the geodb ?
what is the equiv of py : arcpy.env.workspace = ...
List<object> argsList = new List<object>() { featureclassNameToDelete };
var args = Geoprocessing.MakeValueArray(argsList.ToArray());
IGPResult result = await Geoprocessing.ExecuteToolAsync("Delete_management", args);
Figured this out :
List<object> argsList = new List<object>() { featureclassNameToDelete };
var args = Geoprocessing.MakeValueArray(argsList.ToArray());
var envs = Geoprocessing.MakeEnvironmentArray(workspace : gdbPath);
IGPResult result = await Geoprocessing.ExecuteToolAsync("Delete_management", args, envs);