Re: [Ironpython-users] How to free memory in ironpython

2016-11-27 Thread Pawel Jasinski
sorry, the other answer went without the list. For popen, here is not tested snipped to give you a jump start. The docs for subprocess.popen are your friend. import subprocess args = ["replace with full path to ogr2ogr.exe", osm_filePath, shps_filePa

Re: [Ironpython-users] How to free memory in ironpython

2016-11-27 Thread Djordje Spasic via Ironpython-users
Hi Pawel, Thank you for the suggestion. I am not familiar with subprocess.popen. How would command line utility look like for this code: import clr iteropMapWinGIS_dll_filePath = "C:\\ProgramFiles\\MapWindow GIS Lite\\Interop.MapWinGIS.dll"clr.AddReferenceToFileAndPath(iteropMapWinGIS_dll_filePa

Re: [Ironpython-users] How to free memory in ironpython

2016-11-26 Thread Tim Baigent
I'm out of my depth here, forgive me for not keeping quiet! But perhaps you are be best to create separate instances of the MapWinGIS.Utils class, one for each call, so that there is no chance for inadverently sharing values between instance members. So something like this (and here I'm *really

Re: [Ironpython-users] How to free memory in ironpython

2016-11-26 Thread Djordje Spasic via Ironpython-users
Thank you for the suggestion Tim! I tried something similar. I cannot call methods if I create an instance of the UtilsClass class, as I always get an error message: Could not convert argument 0 for call to UtilsClassMethod but I can if I call them as static methods. So I tried this: utils1 = M

Re: [Ironpython-users] How to free memory in ironpython

2016-11-25 Thread Djordje Spasic via Ironpython-users
Hi Steve, I imagine that you do not have any spare time left. Still, do you have any suggestion on how I can solve this issue? Thank you for the reply. Kind regards, Djordje Spasic On Monday, November 7, 2016 11:55 PM, Djordje Spasic via Ironpython-users wrote: Hello, I have an issu

Re: [Ironpython-users] How to free memory in ironpython

2016-11-10 Thread Djordje Spasic via Ironpython-users
Yes, that's what I did. But I forgot to remove the "utils" from the list of arguments, when I wrote it. I just copied your code. Sorry about that. So this call: convertToShapefiles_Result = utils.OGR2OGR(osm_filePath, shps_filePath, bstrOptions, None)  raises this error: Could not convert arg

Re: [Ironpython-users] How to free memory in ironpython

2016-11-10 Thread Slide
Oh, I missed the utils being passed in, that's roughly the same thing. If you use just "utils" you would want to remove it from the parameter list of the call. On Thu, Nov 10, 2016 at 6:02 AM Djordje Spasic wrote: > Thank you for the reply Alex, > > I apologize for misunderstanding you. > > If I

Re: [Ironpython-users] How to free memory in ironpython

2016-11-10 Thread Djordje Spasic via Ironpython-users
Thank you for the reply Alex, I apologize for misunderstanding you. If I try to call the OGR2OGR method like that: convertToShapefiles_Result = utils.OGR2OGR(utils, osm_filePath, shps_filePath, bstrOptions, None)  Then I get an error message: Could not convert argument 0 for call to OGR2OGR

Re: [Ironpython-users] How to free memory in ironpython

2016-11-10 Thread Slide
That's not what I was talking about. You are calling the method like a static method by using the class name. Yiuve already created an instance above called "utils". On Thu, Nov 10, 2016, 03:37 Djordje Spasic wrote: > Hi Alex, > > > Thank you for the reply. > > If try to instantiate the MapWinGI

Re: [Ironpython-users] How to free memory in ironpython

2016-11-10 Thread Djordje Spasic via Ironpython-users
Hi Alex, Thank you for the reply. If try to instantiate the MapWinGIS.Utils class, I get the following error message: Cannot create instances of Utils because it is abstract I get the same error message for any MapWinGIS class. If I add "Class" to its name, then everything works fine (like: M

Re: [Ironpython-users] How to free memory in ironpython

2016-11-09 Thread Slide
Your python code is different from what the C# code does: utils = MapWinGIS.*UtilsClass*() osm_filePath = "C:\\rome.osm" shps_filePath = "C:\\rome_sph_files" bstrOptions = '--config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile"' convertToShapefiles_Result = MapWinGIS.UtilsClass.*OGR

Re: [Ironpython-users] How to free memory in ironpython

2016-11-09 Thread Djordje Spasic via Ironpython-users
Hi Steve, Thank you for the reply. This is the C# code sent to me by one of the developers. He calls the OGR2OGR method only once per script, but when he tries to call the script again, it works with no problem. Which is not the case on my PC: GlobalSettings settings = new GlobalSettings();se

Re: [Ironpython-users] How to free memory in ironpython

2016-11-08 Thread Steve Baer
Do they have a sample in C# for how you should use their SDK? That may help us figure out if something should be done differently in IronPython. -Steve Steve Baer Robert McNeel & Associates www.rhino3d.com On Mon, Nov 7, 2016 at 1:25 PM, Djordje Spasic via Ironpython-users < ironpython-users@pyt