<?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: add features to existing shapefile in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573800#M15450</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;You can use IFeatureClass.CreateFeature and IFeature.Store for a single feature &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or insert cursor for a group of features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/e7b33417-0373-4f87-93db-074910907898.htm"&gt;http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/e7b33417-0373-4f87-93db-074910907898.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Aug 2010 12:05:30 GMT</pubDate>
    <dc:creator>NirYoscovitz</dc:creator>
    <dc:date>2010-08-17T12:05:30Z</dc:date>
    <item>
      <title>add features to existing shapefile</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573798#M15448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Today I am stuck up with a new problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to develop a tool in which i have to add the features to an existing shapefile and store them.I understand only c#.can any1 help me with the code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 09:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573798#M15448</guid>
      <dc:creator>YashikaSareen</dc:creator>
      <dc:date>2010-08-17T09:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: add features to existing shapefile</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573799#M15449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i m beginner and using vba and vb but look here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1170&amp;amp;t=217820&amp;amp;mc=5#659620"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=1170&amp;amp;t=217820&amp;amp;mc=5#659620&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;or here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=119817"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=119817&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 11:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573799#M15449</guid>
      <dc:creator>DanielTuracek</dc:creator>
      <dc:date>2010-08-17T11:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: add features to existing shapefile</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573800#M15450</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;You can use IFeatureClass.CreateFeature and IFeature.Store for a single feature &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or insert cursor for a group of features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/e7b33417-0373-4f87-93db-074910907898.htm"&gt;http://resources.esri.com/help/9.3/ArcGISEngine/dotnet/e7b33417-0373-4f87-93db-074910907898.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Aug 2010 12:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573800#M15450</guid>
      <dc:creator>NirYoscovitz</dc:creator>
      <dc:date>2010-08-17T12:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: add features to existing shapefile</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573801#M15451</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;SPAN&gt;i tried to use the above said methods but unable to get the desired result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can any1 provide me with the code to add the features to an existing shape file so that i can understand..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yashika Sareen:confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 05:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573801#M15451</guid>
      <dc:creator>YashikaSareen</dc:creator>
      <dc:date>2010-08-18T05:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: add features to existing shapefile</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573802#M15452</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;SPAN&gt;The link from Nir's reply above seems to have a decent c# example.&amp;nbsp; What problem are you having getting this to do what you want?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
public static void CreateFeature(IFeatureClass featureClass, IPolyline polyline)
{
&amp;nbsp; // Build the feature.
&amp;nbsp; IFeature feature = featureClass.CreateFeature();
&amp;nbsp; feature.Shape = polyline;

&amp;nbsp; // Apply the appropriate subtype to the feature.
&amp;nbsp; ISubtypes subtypes = (ISubtypes)featureClass;
&amp;nbsp; IRowSubtypes rowSubtypes = (IRowSubtypes)feature;
&amp;nbsp; if (subtypes.HasSubtype)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; // In this example, the value of 3 represents the PVC subtype.
&amp;nbsp;&amp;nbsp;&amp;nbsp; rowSubtypes.SubtypeCode = 3;
&amp;nbsp; }

&amp;nbsp; // Initialize any default values the feature has.
&amp;nbsp; rowSubtypes.InitDefaultValues();

&amp;nbsp; // Update the value on a string field that indicates who installed the feature.
&amp;nbsp; int contractorFieldIndex = featureClass.FindField("CONTRACTOR");
&amp;nbsp; feature.set_Value(contractorFieldIndex, "K Johnston");

&amp;nbsp; // Commit the new feature to the geodatabase.
&amp;nbsp; feature.Store();
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:42:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/add-features-to-existing-shapefile/m-p/573802#M15452</guid>
      <dc:creator>AndrewMay</dc:creator>
      <dc:date>2021-12-12T00:42:16Z</dc:date>
    </item>
  </channel>
</rss>

