Hello, 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:
using MapWinGIS; string shpfilename = "C:/example.shp"; Shapefile sf = new Shapefile(); if (sf.Open(shpfilename, null)) { } However, when I try the same thing in ironpython: import clr import os shpfilename = "C:/example.shp" dllsfilename = "C:/mapwindow_dlls" clr.AddReferenceToFileAndPath(os.path.join(dllsfilename, "Interop.MapWinGIS.dll")) print "Interop.MapWinGIS.dll loaded: ", "Interop.MapWinGIS" in [assembly.GetName().Name for assembly in clr.References] # prints: True import MapWinGIS sf = MapWinGIS.Shapefile() # raises Error sf.Open(shpfilename, None) 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. Kind regards, Djordje Spasic
_______________________________________________ Ironpython-users mailing list Ironpython-users@python.org https://mail.python.org/mailman/listinfo/ironpython-users