[Ironpython-users] Cannot create instances of that class because it is abstract
issworld2000 at yahoo.com
Mon Jan 25 11:03:52 EST 2016
I am trying to call a specific method ("Open") from the .NET assembly.The .NET assembly along with all other .dlls and necessary files, can be downloaded from here. It's free an open source project: MapWindow.
In their examples page, by loading the Interop.MapWinGIS.dll file, they call the MapWinGIS.Shapefile.Open() method like so:
string shpfilename = "C:/example.shp";
Shapefile sf = new Shapefile();
if (sf.Open(shpfilename, null))
However, when I try the same thing in ironpython:
shpfilename = "C:/example.shp"
dllsfilename = "C:/mapwindow_dlls"
print "Interop.MapWinGIS.dll loaded: ", "Interop.MapWinGIS" in [assembly.GetName().Name for assembly in clr.References] # prints: True
sf = MapWinGIS.Shapefile() # raises Error
I am getting an error message:
"Message: Cannot create instances of Shapefile because it is abstract"
Why is this happening?
I contacted the author of the project, but couldn't solve the issue.
Any kind of advice would be helpful.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users