Hi,
I am new to this ArcObjects SDK development
I am trying to get the feature class name from the shapefile.
But it throws,
System.Runtime.InteropServices.COMException: 'Unspecified error
The element '{http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes}Text' is used but not declared in the DTD/Schema.
I can't find solution to resolve this.
I am attaching my code snippet and error message below.
It would be more helpful if anyone has solution for this.
I am using visual studio 2019 and ArcGIS 10.8
This is how I connect to a shapefile workspace:
public static IWorkspace OpenShapeFileWorkspace(string shapeFileDir)
{
IWorkspace ws;
IPropertySet pShpConn = new PropertySetClass();
pShpConn.SetProperty("DATABASE", shapeFileDir);
IWorkspaceFactory wsf = new ShapefileWorkspaceFactoryClass();
ws = wsf.Open(pShpConn, 0);
return ws;
}
Hi,
Thanks for your reply.
I tried your code, but it also throws the same exception.
Please help me out in this.
What is expected from http://schemas.microsoft.com/windows/2005/02/color/WcsCommonProfileTypes ?
On the surface it looks like the shapefile is corrupted. There may be something in it that is unsupported.
I would test opening other simpler shape files to test this.
Brent