Hi,I want to drop a reprentation in a geodatabase,and I use the DropRepresentation Geoprocessoring tool in C#,the code is following:
private bool RemoveRepresentation(IRepresentationWorkspaceExtension pRepWksExt,IFeatureClass pFeatureClass)
{
IEnumDatasetName enumDatasetName = pRepWksExt.get_FeatureClassRepresentationNames(pFeatureClass);
enumDatasetName.Reset();
IDatasetName pDatasetName = enumDatasetName.Next();
ESRI.ArcGIS.Geoprocessor.Geoprocessor gp = new ESRI.ArcGIS.Geoprocessor.Geoprocessor();
while (pDatasetName != null)
{
try
{
DropRepresentation dropRep = new DropRepresentation();
dropRep.representation = pDatasetName.Name;
dropRep.in_features = pFeatureClass;
gp.Execute(dropRep, null);
}
catch (Exception ex)
{ return false; }
pDatasetName = enumDatasetName.Next();
}
return true;
}
but in the line of gp.Execute(dropRep, null), it failed,the error code is -2147467259,HRESULT E_FAIL。 help! thanks!
In the help for this geo-processing tool it sets the workspace in the sample code, try doing that?