<?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 Re: PLS Help: Using VB6 to access Geoprocessing Object in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79513#M2115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisengine/com_cpp/samples/com/Geoprocessing/5eb001ba-1d6b-4596-b5f8-27c2ad7cb210.htm"&gt;sample&lt;/A&gt;&lt;SPAN&gt; of how to set up the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;IGeoProcessor&lt;/SPAN&gt;&lt;SPAN&gt;, in this example they are calling a custom tool but it could equally be a standard esri tool. You just need to be careful in the order you add the tools parameters to the array object, this must be the same as how you would fill in the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2011 15:34:20 GMT</pubDate>
    <dc:creator>DuncanHornby</dc:creator>
    <dc:date>2011-07-06T15:34:20Z</dc:date>
    <item>
      <title>PLS Help: Using VB6 to access Geoprocessing Object</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79510#M2112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Good Morning,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;having trouble moving a 9.2 tool to 9.3.1.&amp;nbsp; The code below works great on 9.2:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
Public Sub subMakeLines(sAccum As String, sImpedAtt As String, sDefBreakVal As String, sOutPath As String, sNetworkPath As String, sFacilitySHPName As String, sOutName As String, sOutPolyName As String)
 
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pGp As Object, pFLayer As IFeatureLayer2, pFClass As IFeatureClass
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim pDS As IDataset
&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sBarrierPath As String, sTempFolder As String, FSO As New FileSystemObject, sServiceAreaName As String

183:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; frmExportFeaturesToSHP.lbStatus = "Processing: " &amp;amp; Globals.g_iFeatNum &amp;amp; " of " &amp;amp; Globals.g_iFeatCount &amp;amp; " Facilities!"
184:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; frmExportFeaturesToSHP.Refresh
'185:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sServiceAreaName = "LineServiceArea_" &amp;amp; Globals.g_iFeatNum
186:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sServiceAreaName = "LineServiceArea"
187:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set pGp = CreateObject("esriGeoprocessing.GpDispatch.1")
188:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGp.OverwriteOutput = 1
189:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGp.Toolbox = "C:\Program Files\ArcGIS\ArcToolbox\Toolboxes\Network Analyst Tools.tbx"
190:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGp.MakeServiceAreaLayer_na sNetworkPath, sServiceAreaName, sImpedAtt, "TRAVEL_FROM", sDefBreakVal, g_sPolyType, g_sMultiFacOptions, g_sOverlapType, g_sLineType, g_sOverlapTypeLines, g_sSplitLinesAtSrvAreaBreak, g_sExcludedSources, sAccum, "ALLOW_UTURNS", "", g_sTrimPoly, g_sTrimThres, "LINES_SOURCE_FIELDS"
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But at 9.3.1 it doesn't work.&amp;nbsp; We think the issue is the way we are initializing the pGp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that I need to do something along the lines of replacing line 187 with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
187:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcgisscripting
188:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGp = arcgisscripting.create(9.2)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this roughly how it is done?&amp;nbsp; Would it be 9.2 b/c that's the version I have on the development machine? or would I use 9.3 as that is the version on the target/testing machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks in advance for any and all suggestions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take care,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;C&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jun 2011 13:02:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79510#M2112</guid>
      <dc:creator>CraigGraham</dc:creator>
      <dc:date>2011-06-29T13:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: PLS Help: Using VB6 to access Geoprocessing Object</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79511#M2113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Craig,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The lines of code 187 &amp;amp; 188 you are suggesting is python code which is not VB. I have 9.3 and the CreateObject function on line 187 works fine for me so this makes me wonder if ESRI have done something behind the scenes in 9.3.1. Can someone clarify this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ESRI want us to use the new way of creating a GeoProcessor object, the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;IGeoProcessor&lt;/SPAN&gt;&lt;SPAN&gt;. You can still call the standard tools using this new interface you just do it differently. I find it actually easier to use, as the intellisense works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do a search on the old forum for &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;IGeoProcessor &lt;/SPAN&gt;&lt;SPAN&gt;and you'll see lots of examples of how to construct it and invoke tools with it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 14:13:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79511#M2113</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-07-06T14:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: PLS Help: Using VB6 to access Geoprocessing Object</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79512#M2114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Duncan, thanks so much for your reply.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;The lines of code 187 &amp;amp; 188 you are suggesting is python code which is not VB. I have 9.3 and the CreateObject function on line 187 works fine for me so this makes me wonder if ESRI have done something behind the scenes in 9.3.1. Can someone clarify this?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime we've been testing stuff out and we cant replicate the errors that the user is reporting.&amp;nbsp; And the syntax I have in line 187 is what we've used in the past.&amp;nbsp; But it is failing on that line.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;ESRI want us to use the new way of creating a GeoProcessor object, the &lt;SPAN style="font-style:italic;"&gt;IGeoProcessor&lt;/SPAN&gt;. You can still call the standard tools using this new interface you just do it differently. I find it actually easier to use, as the intellisense works.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is great news going forward.&amp;nbsp; That will be a big help.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Craig&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 15:09:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79512#M2114</guid>
      <dc:creator>CraigGraham</dc:creator>
      <dc:date>2011-07-06T15:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: PLS Help: Using VB6 to access Geoprocessing Object</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79513#M2115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is a &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisengine/com_cpp/samples/com/Geoprocessing/5eb001ba-1d6b-4596-b5f8-27c2ad7cb210.htm"&gt;sample&lt;/A&gt;&lt;SPAN&gt; of how to set up the &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;IGeoProcessor&lt;/SPAN&gt;&lt;SPAN&gt;, in this example they are calling a custom tool but it could equally be a standard esri tool. You just need to be careful in the order you add the tools parameters to the array object, this must be the same as how you would fill in the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 15:34:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/pls-help-using-vb6-to-access-geoprocessing-object/m-p/79513#M2115</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2011-07-06T15:34:20Z</dc:date>
    </item>
  </channel>
</rss>

