<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:13px"><div id="yui_3_16_0_1_1480156328934_725981" dir="ltr"><span id="yui_3_16_0_1_1480156328934_726036">Thank you for the suggestion Tim!<br><br>I tried something similar. I cannot call methods if I create an instance of the UtilsClass class, as I always get an error message:<br></span></div><blockquote id="yui_3_16_0_1_1480156328934_726544"><div dir="ltr" id="yui_3_16_0_1_1480156328934_726446"><span id="yui_3_16_0_1_1480156328934_726450">Could not convert argument 0 for call to </span><span id="yui_3_16_0_1_1480156328934_726036"><span id="yui_3_16_0_1_1480156328934_726451">UtilsClassMethod</span></span></div></blockquote><div dir="ltr" id="yui_3_16_0_1_1480156328934_726477"><span id="yui_3_16_0_1_1480156328934_726036">but I can if I call them as static methods. So I tried this:<br></span></div><blockquote id="yui_3_16_0_1_1480156328934_726584"><div dir="ltr" id="yui_3_16_0_1_1480156328934_726570"><span id="yui_3_16_0_1_1480156328934_726036">utils1 = MapWinGIS.Utils()<br id="yui_3_16_0_1_1480156328934_726150">utils2 = MapWinGIS.Utils()<br></span></div><div dir="ltr" id="yui_3_16_0_1_1480156328934_726215"><span id="yui_3_16_0_1_1480156328934_726036"><br></span></div><div dir="ltr" id="yui_3_16_0_1_1480156328934_726256"><span id="yui_3_16_0_1_1480156328934_726220"><span id="yui_3_16_0_1_1480156328934_726251">returnedValue1 = </span>MapWinGIS.UtilsClass.UtilsClassMethod(</span><span id="yui_3_16_0_1_1480156328934_726225"><span id="yui_3_16_0_1_1480156328934_726221">utils1, </span></span><span id="yui_3_16_0_1_1480156328934_726036"><span id="yui_3_16_0_1_1480156328934_726226">variable1a, variable1b</span>)</span><span id="yui_3_16_0_1_1480156328934_726263"><span id="yui_3_16_0_1_1480156328934_726264">returnedValue2 = </span>MapWinGIS.UtilsClass.UtilsClassMethod(</span><span id="yui_3_16_0_1_1480156328934_726265"><span id="yui_3_16_0_1_1480156328934_726266">utils2, </span></span><span id="yui_3_16_0_1_1480156328934_726267"><span id="yui_3_16_0_1_1480156328934_726268">variable2a, variable2b</span>)</span></div></blockquote><div class="qtdSeparateBR" id="yui_3_16_0_1_1480156328934_725978"><div id="yui_3_16_0_1_1480156328934_726296" dir="ltr">But this did not fix the problem. <i id="yui_3_16_0_1_1480156328934_726645">returnedValue1</i> still returns <i>True</i>, while <i>returnedValue2</i> returns <i id="yui_3_16_0_1_1480156328934_726646">False</i>.<br><br><br></div><div id="yui_3_16_0_1_1480156328934_726539"><br></div><div id="yui_3_16_0_1_1480156328934_726217">--------------------------------<br></div></div><div class="yahoo_quoted" id="yui_3_16_0_1_1480156328934_725885" style="display: block;"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 13px;" id="yui_3_16_0_1_1480156328934_725884"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_1_1480156328934_725883"> <div dir="ltr" id="yui_3_16_0_1_1480156328934_725980"><font id="yui_3_16_0_1_1480156328934_725979" size="2" face="Arial"> On Saturday, November 26, 2016 7:10 AM, Tim Baigent <tjhb@clear.net.nz> wrote:<br></font></div> <br> <div class="y_msg_container" id="yui_3_16_0_1_1480156328934_725882"><div id="yiv6157549330"><div id="yui_3_16_0_1_1480156328934_725881"><div></div><div id="yui_3_16_0_1_1480156328934_725880">I'm out of my depth here, forgive me for not keeping quiet!</div><div id="yui_3_16_0_1_1480156328934_726095"><br clear="none"></div><div id="yui_3_16_0_1_1480156328934_725892">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.</div><div><br clear="none"></div><div id="yui_3_16_0_1_1480156328934_726096">So something like this (and here I'm *really* out of my depth):</div><div id="yui_3_16_0_1_1480156328934_726089"><br clear="none"></div><div id="yui_3_16_0_1_1480156328934_726038">utils1 = MapWinGIS.Utils()</div><div id="yui_3_16_0_1_1480156328934_726037">utils2 = MapWinGIS.Utils()</div><div id="yui_3_16_0_1_1480156328934_725893">...</div><div id="yui_3_16_0_1_1480156328934_726091">returnedValue1 = utils1(variable1a, variable1b)</div><div id="yui_3_16_0_1_1480156328934_726090">returnedValue2 = utils2(variable2a, variable2b)</div><div id="yui_3_16_0_1_1480156328934_726092"><br clear="none"></div><div id="yui_3_16_0_1_1480156328934_726097">Is that possible?</div><div class="yiv6157549330yqt7203490549" id="yiv6157549330yqt12955"><div id="yui_3_16_0_1_1480156328934_725894"><br clear="none">On 26/11/2016, at 7:47 AM, Djordje Spasic via Ironpython-users <<a rel="nofollow" shape="rect" ymailto="mailto:ironpython-users@python.org" target="_blank" href="mailto:ironpython-users@python.org">ironpython-users@python.org</a>> wrote:<br clear="none"><br clear="none"></div><blockquote type="cite" id="yui_3_16_0_1_1480156328934_725897"><div id="yui_3_16_0_1_1480156328934_725896"><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yui_3_16_0_1_1480156328934_725895">Hi Steve,<br clear="none"><br clear="none">I imagine that you do not have any spare time left.<br clear="none">Still, do you have any suggestion on how I can solve this issue?<br clear="none"><div id="yiv6157549330yui_3_16_0_1_1480091050541_18631"><span><br clear="none">Thank you for the reply.<br clear="none"></span></div><div id="yiv6157549330yui_3_16_0_1_1480091050541_19422"><span><br clear="none"></span></div><div id="yiv6157549330yui_3_16_0_1_1480091050541_19463"><span>Kind regards,<br clear="none">Djordje Spasic</span></div> <div class="yiv6157549330qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv6157549330yahoo_quoted" style="display:block;" id="yui_3_16_0_1_1480156328934_725933"> <div style="font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yui_3_16_0_1_1480156328934_725932"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;" id="yui_3_16_0_1_1480156328934_725931"> <div dir="ltr"><font size="2" face="Arial"> On Monday, November 7, 2016 11:55 PM, Djordje Spasic via Ironpython-users <<a rel="nofollow" shape="rect" ymailto="mailto:ironpython-users@python.org" target="_blank" href="mailto:ironpython-users@python.org">ironpython-users@python.org</a>> wrote:<br clear="none"></font></div> <br clear="none"><br clear="none"> <div class="yiv6157549330y_msg_container" id="yui_3_16_0_1_1480156328934_725930"><div id="yiv6157549330"><div id="yui_3_16_0_1_1480156328934_725929"><div style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;" id="yui_3_16_0_1_1480156328934_725928"><div id="yiv6157549330"><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16565"><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16564" style="color:#000;background-color:#fff;font-family:verdana, helvetica, sans-serif;font-size:13px;">Hello,<br clear="none"><br clear="none"><div dir="ltr" id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31768">I have an issue. I am using ironpython 2.7 editor called through <a rel="nofollow" shape="rect" class="yiv6157549330edited-link-editor" id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31681" target="_blank" href="https://www.rhino3d.com/">Rhino 5</a> application, and I load a single .dll file from an application called <a rel="nofollow" shape="rect" class="yiv6157549330edited-link-editor" id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31925" target="_blank" href="https://mapwingis.codeplex.com/releases">MapWinGIS</a>. Like so:</div><blockquote id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32088"><div dir="ltr" id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32020">
</div><div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32246" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32247" style="font-size:10pt;color:black;">dll_filePath = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32248" style="font-size:10pt;color:red;">"C:\Program
Files\MapWinGIS\Interop.MapWinGIS.dll"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32249" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32250" style="font-size:10pt;color:black;">clr.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32251"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32252" style="font-size:10pt;color:midnightblue;">AddReferenceToFileAndPath</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32253" style="font-size:10pt;color:black;">(dll_filePath)</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32254"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32255"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32256" style="font-size:10pt;line-height:115%;color:blue;">import </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32257" style="font-size:10pt;line-height:115%;color:black;">MapWinGIS</span></div>
</blockquote>The problem is that I can only call a particular method <b>once</b>.<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31173" clear="none">If try to do that the second time, the same method returns "False". When method works correctly (the first time) it return: "True".<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31174" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31175" clear="none">The problem goes away if I restart the Rhino 5 application (and ironpython 2.7 editor along with it).<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31176" clear="none"><div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33258"><br clear="none"></div><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16632"><br clear="none"></div>Why is this happening? I contacted the developers of upper mentioned MapWinGIS application, and they said that they can not replicate this behavior and that I should ask this question on ironpython mailing list. They suggested that I need to somehow <i id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32296">"free the memory before you do the second run of the method"</i>.<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31178" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31179" clear="none">So to make my problem more clear, this is what happens:<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31180" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31181" clear="none">If run a script containing the this particular method twice, the first call of the method returns "True", the second one "False":<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31183" clear="none"><blockquote id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32340"><div>
</div><div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32396" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32397" style="font-size:10pt;color:black;">variable1a = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32398" style="font-size:10pt;color:red;">"something1a"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32399" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32400" style="font-size:10pt;color:black;">variable1b = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32401" style="font-size:10pt;color:red;">"something1b"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32402" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32403" style="font-size:10pt;color:black;">returnedValue1 =
MapWinGIS.someClass.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32404"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32405" style="font-size:10pt;color:midnightblue;">someMethod1</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32406" style="font-size:10pt;color:black;">(variable1a, variable1b)<span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32407" style=""> </span></span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32408" style="font-size:10pt;color:green;"># returns "True"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32409" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32410" style="font-size:10pt;color:green;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32411" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32412" style="font-size:10pt;color:black;">variable2a = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32413" style="font-size:10pt;color:red;">"something2a"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32414" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32415" style="font-size:10pt;color:black;">variable2b = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32416" style="font-size:10pt;color:red;">"something2b"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32417"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32418" style="font-size:10pt;line-height:115%;color:black;">returnedValue2 = MapWinGIS.someClass.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32419"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32420" style="font-size:10pt;line-height:115%;color:midnightblue;">someMethod1</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32421" style="font-size:10pt;line-height:115%;color:black;">(variable2a,
variable2b)<span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32422" style=""> </span></span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32423" style="font-size:10pt;line-height:115%;color:green;">#
returns "False"</span></div>
</blockquote>If run the same script again, both upper calls of MapWinGIS.someClass.someMethod1 method return "False".<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31188" clear="none">If I restart my Rhino 5 application, then again the same thing happens: "True" is returned on first MapWinGIS.someClass.someMethod1 call, while "False" is returned on the second call. If run the script again, then they both return "False". For every other run of the script, I get "False" on both calls. And this continues until I restart Rhino 5.<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31189" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31190" clear="none">I perfectly understand that it is impossible for anyone from Ironpython mailing list to know the exact cause of this problem.<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31191" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31192" clear="none">But can you at least help me with <i>"free the memory before you do the second run of the method"</i> part?<br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31193" clear="none"><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31194" clear="none">I tried deleting all the variables after the first call, calling the garbage collector and also removing the .dll file from the list of loaded assemblies. Like this:<blockquote id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32602"><div dir="ltr" id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32490">
</div><div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32901" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32902"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32903" style="font-size:10pt;color:blue;">import </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32904" style="font-size:10pt;color:black;">clr</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32905" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32906"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32907" style="font-size:10pt;color:blue;">import </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32908" style="font-size:10pt;color:black;">gc</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32909" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32910" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32911" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32912" style="font-size:10pt;color:black;">dll_filePath = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32913" style="font-size:10pt;color:red;">"C:\Program
Files\MapWinGIS\Interop.MapWinGIS.dll"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32914" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32915" style="font-size:10pt;color:black;">clr.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32916"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32917" style="font-size:10pt;color:midnightblue;">AddReferenceToFileAndPath</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32918" style="font-size:10pt;color:black;">(dll_filePath)</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32919" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32920"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32921" style="font-size:10pt;color:blue;">import </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32922" style="font-size:10pt;color:black;">MapWinGIS</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32923" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32924" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32925" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32926" style="font-size:10pt;color:black;">variable1a = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32927" style="font-size:10pt;color:red;">"something1a"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32928" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32929" style="font-size:10pt;color:black;">variable1b = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32930" style="font-size:10pt;color:red;">"something1b"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32931" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32932" style="font-size:10pt;color:black;">returnedValue1 =
MapWinGIS.someClass.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32933"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32934" style="font-size:10pt;color:midnightblue;">someMethod1</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32935" style="font-size:10pt;color:black;">(variable1a, variable1b)<span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32936" style=""> </span></span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32937" style="font-size:10pt;color:green;"># returns "True"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32938" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32939" style="font-size:10pt;color:green;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32940" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32941" style="font-size:10pt;color:green;"># delete all variables</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32942" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><font id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33139"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32943"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32944" style="font-size:10pt;color:blue;">del </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32945" style="font-size:10pt;color:black;">dll_filePath; </span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32946"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32947" style="font-size:10pt;color:blue;">del </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32948" style="font-size:10pt;color:black;">variable1a; </span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32949"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32950" style="font-size:10pt;color:blue;">del </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32951" style="font-size:10pt;color:black;">variable1b; </span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32952"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32953" style="font-size:10pt;color:blue;">del </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32954" style="font-size:10pt;color:black;">returnedValue1; </span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32955"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32956" style="font-size:10pt;color:blue;">del </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32957" style="font-size:10pt;color:black;">MapWinGIS</span></font></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32958" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32959" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32960" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32961" style="font-size:10pt;color:green;"># remove the .dll from the list
of assemblies</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32962" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32963"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32964" style="font-size:10pt;color:blue;">for </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32965" style="font-size:10pt;color:black;">i,assembly </span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32966"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32967" style="font-size:10pt;color:blue;">in </span></b><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32968"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32969" style="font-size:10pt;color:midnightblue;">enumerate</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32970" style="font-size:10pt;color:black;">(clr.References):</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32971" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><font id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33138"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32972" style="font-size:10pt;color:black;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32973" style=""> </span></span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32974"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32975" style="font-size:10pt;color:blue;">if </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32976" style="font-size:10pt;color:black;">assembly.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32977"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32978" style="font-size:10pt;color:midnightblue;">GetName</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32979" style="font-size:10pt;color:black;">().Name == </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32980" style="font-size:10pt;color:red;">"Interop.MapWinGIS"</span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32981" style="font-size:10pt;color:black;">:</span></font></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32982" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32983" style="font-size:10pt;color:black;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32984" style=""> </span>clr.References.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32985"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32986" style="font-size:10pt;color:midnightblue;">RemoveAt</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32987" style="font-size:10pt;color:black;">(i)</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32988" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32989" style="font-size:10pt;color:black;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32990" style=""> </span></span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32991" style="font-size:10pt;color:navy;">break</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32992" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32993" style="font-size:10pt;color:navy;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32994" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32995" style="font-size:10pt;color:green;"># collect garbage</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32996" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32997" style="font-size:10pt;color:black;">gc.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32998"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_32999" style="font-size:10pt;color:midnightblue;">collect</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33000" style="font-size:10pt;color:black;">()</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33001" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33002" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33003" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33004" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33005" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33006" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33007" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33008" style="font-size:10pt;color:black;">dll_filePath2 = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33009" style="font-size:10pt;color:red;">"C:\Program
Files\MapWinGIS\Interop.MapWinGIS.dll"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33010" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><font id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33137"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33011" style="font-size:10pt;color:black;">clr.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33012"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33013" style="font-size:10pt;color:midnightblue;">AddReferenceToFileAndPath</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33014" style="font-size:10pt;color:black;">(dll_filePath2)</span></font></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33015" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33016"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33017" style="font-size:10pt;color:blue;">import </span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33018" style="font-size:10pt;color:black;">MapWinGIS</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33019" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33020" style="font-size:10pt;color:black;"> </span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33021" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33022" style="font-size:10pt;color:black;">variable2a = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33023" style="font-size:10pt;color:red;">"something2a"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33024" style="margin-bottom:0cm;margin-bottom:.0001pt;line-height:normal;"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33025" style="font-size:10pt;color:black;">variable2b = </span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33026" style="font-size:10pt;color:red;">"something2b"</span></div>
<div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33027"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33028" style="font-size:10pt;line-height:115%;color:black;">returnedValue2 = MapWinGIS.someClass.</span><b id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33029"><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33030" style="font-size:10pt;line-height:115%;color:midnightblue;">someMethod1</span></b><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33031" style="font-size:10pt;line-height:115%;color:black;">(variable2a,
variable2b)<span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33032" style=""> </span></span><span id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33033" style="font-size:10pt;line-height:115%;color:green;">#
returns "False"</span></div>
</blockquote><br id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_31198" clear="none">But it is not working (I still get the "True" on first method call, and "False" on second).<br clear="none"><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16707">I also tried to exchange the <i id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33455">variable1a</i> and <i id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_33466">variable1b</i> with <i>variable2a</i> and <i id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16708">variable2b</i>. Or even use the same variables in both MapWinGIS.someClass.someMethod1 calls. Still, no improvement.</div><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16712"><br clear="none"></div><div dir="ltr" id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_16710">The MapWinGIS.someClass.someMethod1 that I am calling is actually: <a rel="nofollow" shape="rect" class="yiv6157549330edited-link-editor" id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_20049" target="_blank" href="https://web.archive.org/web/20160305060402/http://www.mapwindow.org/documentation/mapwingis4.9/class_utils.html#a269f6ab098480f14202a530d7e278407">MapWinGIS.UtilsClass.OGR2OGR</a>.<br clear="none">I named it MapWinGIS.someClass.someMethod1 to make it easier for others to follow the code. Not sure if this was good idea. If it wasn't I apologize.<br clear="none"></div><div id="yiv6157549330yui_3_16_0_ym19_1_1478550521846_20050"><br clear="none"></div><div><br clear="none"></div>This issue is driving me crazy. I would be very grateful for any kind of advice.<br clear="none">Thank you in advance!<br clear="none"><br clear="none"><br clear="none">Kind regards,<br clear="none">Djordje Spasic<br clear="none"><div id="yiv6157549330yui_3_16_0_ym19_1_1478542079221_29194"><br clear="none"></div></div></div></div></div></div></div><br clear="none">_______________________________________________<br clear="none">Ironpython-users mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:Ironpython-users@python.org" target="_blank" href="mailto:Ironpython-users@python.org">Ironpython-users@python.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://mail.python.org/mailman/listinfo/ironpython-users">https://mail.python.org/mailman/listinfo/ironpython-users</a><br clear="none"><br clear="none"><br clear="none"></div> </div> </div> </div></div></div></blockquote></div><blockquote type="cite" id="yui_3_16_0_1_1480156328934_726490"><div id="yui_3_16_0_1_1480156328934_726489"><span id="yui_3_16_0_1_1480156328934_726488">_______________________________________________</span><br clear="none"><span>Ironpython-users mailing list</span><br clear="none"><span><a rel="nofollow" shape="rect" ymailto="mailto:Ironpython-users@python.org" target="_blank" href="mailto:Ironpython-users@python.org">Ironpython-users@python.org</a></span><br clear="none"><span><a rel="nofollow" shape="rect" target="_blank" href="https://mail.python.org/mailman/listinfo/ironpython-users">https://mail.python.org/mailman/listinfo/ironpython-users</a></span><br clear="none"></div></blockquote></div></div><br><br></div> </div> </div> </div></div></body></html>