<?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: How can I input several files for tools in arcobject? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564617#M15208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example that ESRI support sent to me on using several inputs for the Intersect tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;ESRI.ArcGIS.Geoprocessor.Geoprocessor GP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); GP.OverwriteOutput = true; IGPUtilities2 gpUtils = new GPUtilitiesClass(); IFeatureClass inFeature1 = gpUtils.OpenFeatureClassFromString(@"E:\Test.gdb\states"); IFeatureClass inFeature2 = gpUtils.OpenFeatureClassFromString(@"E:\Test.gdb\us_rivers"); IGpValueTableObject vt = new GpValueTableObjectClass(); //vt.SetColumns(1); vt.SetColumns(2); object weight; weight = 1 as object; object obj1 = inFeature1; vt.AddRow(ref obj1); vt.SetValue(0, 1, ref weight); object obj2 = inFeature2; vt.AddRow(ref obj2); vt.SetValue(1, 1, ref weight); ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect(); intersect.in_features = vt; intersect.out_feature_class = "E:\testout.shp"; GP.Execute(intersect, null);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2012 13:04:31 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2012-05-15T13:04:31Z</dc:date>
    <item>
      <title>How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564615#M15206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I input several shp files or feature classes for tools?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example, if I implement code for 'Intersect' tool to intersect shp files: testA.shp, testB.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;Intersect Inter = new Intersect(); Inter.in_features = features;&amp;nbsp; Inter.out_feature_class = 'result.shp';&amp;nbsp; gp.Execute(Inter, null);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I input 'testA.shp' and 'testB.shp' as parameters for 'in_features' ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know how input single object: @"C:\data\aaa.shp" . like this. I know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I cannot find any document for multiple features. other answers just repeat see reference and sample. I saw them, but I could not figure out because all of samples only showed single parameter!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried 'List' of files, 'Array' of files, and just , or ; but all of them failed to compile.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 May 2012 16:52:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564615#M15206</guid>
      <dc:creator>InsuHong1</dc:creator>
      <dc:date>2012-05-11T16:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564616#M15207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure why you are using single quotes in C#...&amp;nbsp; They are for defining a char (char i = 'i';) Passing in a string array should work fine.&amp;nbsp; If it is not compiling check if you have option strict on.&amp;nbsp; If you do it is a good thing, it just means you can't pass a string array into a property expecting an object without doing as explicit type conversion.&amp;nbsp; The following compiles ok on my machine, I haven't run it because I don't have the shapefiles and can't be bothered right now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Geoprocessor gp = new Geoprocessor();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intersect Inter = new Intersect();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string[] features = {"c:\\shape1.shp", "c:\\shape2.shp"} ; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inter.in_features =&amp;nbsp; features as object;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inter.out_feature_class = "c:\\result.shp"; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gp.Execute(Inter, null);
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564616#M15207</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2021-12-12T00:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564617#M15208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here's an example that ESRI support sent to me on using several inputs for the Intersect tool&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;ESRI.ArcGIS.Geoprocessor.Geoprocessor GP = new ESRI.ArcGIS.Geoprocessor.Geoprocessor(); GP.OverwriteOutput = true; IGPUtilities2 gpUtils = new GPUtilitiesClass(); IFeatureClass inFeature1 = gpUtils.OpenFeatureClassFromString(@"E:\Test.gdb\states"); IFeatureClass inFeature2 = gpUtils.OpenFeatureClassFromString(@"E:\Test.gdb\us_rivers"); IGpValueTableObject vt = new GpValueTableObjectClass(); //vt.SetColumns(1); vt.SetColumns(2); object weight; weight = 1 as object; object obj1 = inFeature1; vt.AddRow(ref obj1); vt.SetValue(0, 1, ref weight); object obj2 = inFeature2; vt.AddRow(ref obj2); vt.SetValue(1, 1, ref weight); ESRI.ArcGIS.AnalysisTools.Intersect intersect = new ESRI.ArcGIS.AnalysisTools.Intersect(); intersect.in_features = vt; intersect.out_feature_class = "E:\testout.shp"; GP.Execute(intersect, null);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 13:04:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564617#M15208</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-05-15T13:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564618#M15209</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;agray: I don't know why, your code did not work my PC. anyway, thanks. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;kenbuja: yours is worked!!!!!&amp;nbsp; Thank you. I reaally appriciate.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 21:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564618#M15209</guid>
      <dc:creator>InsuHong1</dc:creator>
      <dc:date>2012-05-15T21:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564619#M15210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to help. Don't forget to mark the question as answered.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2012 13:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564619#M15210</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-05-16T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564620#M15211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Strange...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;code from kenbuja worked fine with Intersect tool, but it failed with other tools, such as Merge, FeatureToPolygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This drives me crazy. I struck this damn problem 2 weeks.. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I completed lost. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the problem. Somebody please help me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 May 2012 03:28:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564620#M15211</guid>
      <dc:creator>InsuHong1</dc:creator>
      <dc:date>2012-05-20T03:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: How can I input several files for tools in arcobject?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564621#M15212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;See your &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/71008-How-can-I-input-multiple-IFeatureClass-objects-to-geoprocessing-tool"&gt;other question&lt;/A&gt;&lt;SPAN&gt; for the answer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 19:31:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-input-several-files-for-tools-in/m-p/564621#M15212</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2012-11-13T19:31:37Z</dc:date>
    </item>
  </channel>
</rss>

