<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic GPUtilities Class Problem in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710982#M19001</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to use a call to the GPUtilities class 3 times in 2 modules in the VB.NET addin I'm developing (ArcGIS 10.0, VS 2010). Since it is a singleton object, each time it is declared with:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;Dim t As Type = Type.GetTypeFromProgID("esriGeoprocessing.GPUtilities")
Dim obj As System.Object = Activator.CreateInstance(t)
Dim pGPU As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = obj&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;It is working for the first 2 occurrances in the first module, but when the code gets to the third occurrance in the second module&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;Dim pHELLayer As IFeatureLayer = pGPU.OpenFeatureLayerFromString("F:\SD_Tools\HEL_Tool\HEL_Data.shp")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; I get this message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27240[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on how to fix this error? Do I need to go back to using a WorkspaceFactory to access this shapefile?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2013 20:07:20 GMT</pubDate>
    <dc:creator>BruceNielsen</dc:creator>
    <dc:date>2013-09-05T20:07:20Z</dc:date>
    <item>
      <title>GPUtilities Class Problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710982#M19001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to use a call to the GPUtilities class 3 times in 2 modules in the VB.NET addin I'm developing (ArcGIS 10.0, VS 2010). Since it is a singleton object, each time it is declared with:&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;Dim t As Type = Type.GetTypeFromProgID("esriGeoprocessing.GPUtilities")
Dim obj As System.Object = Activator.CreateInstance(t)
Dim pGPU As ESRI.ArcGIS.Geoprocessing.IGPUtilities3 = obj&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;It is working for the first 2 occurrances in the first module, but when the code gets to the third occurrance in the second module&lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;Dim pHELLayer As IFeatureLayer = pGPU.OpenFeatureLayerFromString("F:\SD_Tools\HEL_Tool\HEL_Data.shp")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; I get this message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27240[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on how to fix this error? Do I need to go back to using a WorkspaceFactory to access this shapefile?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 20:07:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710982#M19001</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-09-05T20:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: GPUtilities Class Problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710983#M19002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bruce,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not come across that error before but as I interpret it, it is saying that &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;pHELLayer&lt;/SPAN&gt;&lt;SPAN&gt; exists already. Have you opened it in the other module you refer to? May be using the ReleaseInternals method on IGPUtilities may help?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 12:58:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710983#M19002</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-09-06T12:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: GPUtilities Class Problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710984#M19003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Bruce,&lt;BR /&gt;&lt;BR /&gt;Not come across that error before but as I interpret it, it is saying that &lt;SPAN style="font-style:italic;"&gt;pHELLayer&lt;/SPAN&gt; exists already. Have you opened it in the other module you refer to? May be using the ReleaseInternals method on IGPUtilities may help?&lt;BR /&gt;&lt;BR /&gt;Duncan&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;No, I hadn't used that variable in any other place. I was actually using the OpenFeatureLayerFromString method directly as a parameter in a function, and got the same error. I took it out and assigned it to pHELLayer in order to isolate what was causing the error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will try ReleaseInternals to see if that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 14:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710984#M19003</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-09-06T14:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: GPUtilities Class Problem</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710985#M19004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm reviving this thread because I was bit by the same issue again today. After a Google search (why didn't I think of that last time?), I found a solution by Ken Buja from 2008 in the archived forums (&lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1170&amp;amp;t=248305"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1170&amp;amp;t=248305&lt;/A&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So Ken, if you reply to this thread I'll give you credit for the solution. Thanks for answering my 2 month old question 5 years ago.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Oct 2013 16:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/gputilities-class-problem/m-p/710985#M19004</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-10-29T16:03:00Z</dc:date>
    </item>
  </channel>
</rss>

