<?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 Adding a New Field to Attribute Table in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741690#M19713</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am reentering the frey from a nearly 6 year hiatus form programming and need to do a few simple things to get reantiquated.&amp;nbsp; Unlike MapObjects that had a straightforward API, and as many of you know, ArcObjects does not.&amp;nbsp; I am looking to calculate an index across two layers.&amp;nbsp; I need to get data from the two layers, calculate the index, and store the result in the one layer.&amp;nbsp; The first thing that I need to do is create a new field in the data table.&amp;nbsp; I have identified how to get the fields and get information about them, but I cannot seem to figure out how to add the new field and then likely update it.&amp;nbsp; I don't yet have the Getting to Know ArcObjects book yet but need to get started on this before it arrives.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ron Wilson&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Social Science Analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Office of Policy Developlment and Research&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Department of Housing and Urban Development&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Nov 2010 16:08:12 GMT</pubDate>
    <dc:creator>RonWilson</dc:creator>
    <dc:date>2010-11-18T16:08:12Z</dc:date>
    <item>
      <title>Adding a New Field to Attribute Table</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741690#M19713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am reentering the frey from a nearly 6 year hiatus form programming and need to do a few simple things to get reantiquated.&amp;nbsp; Unlike MapObjects that had a straightforward API, and as many of you know, ArcObjects does not.&amp;nbsp; I am looking to calculate an index across two layers.&amp;nbsp; I need to get data from the two layers, calculate the index, and store the result in the one layer.&amp;nbsp; The first thing that I need to do is create a new field in the data table.&amp;nbsp; I have identified how to get the fields and get information about them, but I cannot seem to figure out how to add the new field and then likely update it.&amp;nbsp; I don't yet have the Getting to Know ArcObjects book yet but need to get started on this before it arrives.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ron Wilson&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Social Science Analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Office of Policy Developlment and Research&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Department of Housing and Urban Development&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 16:08:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741690#M19713</guid>
      <dc:creator>RonWilson</dc:creator>
      <dc:date>2010-11-18T16:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a New Field to Attribute Table</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741691#M19714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What programming language do you intent to use? C#, VB.net, Java, Python...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 17:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741691#M19714</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2010-11-18T17:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a New Field to Attribute Table</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741692#M19715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After I posted the message I realized I forgot to put the technical details in.&amp;nbsp; I am basically using VBA within the VB Macro Editor in ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 18:22:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741692#M19715</guid>
      <dc:creator>RonWilson</dc:creator>
      <dc:date>2010-11-18T18:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a New Field to Attribute Table</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741693#M19716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;you might want to start with this sample&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/ce43d00c-daaf-4c38-b608-2c6f411e81c1.htm"&gt;http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/ce43d00c-daaf-4c38-b608-2c6f411e81c1.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 16:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741693#M19716</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2010-11-19T16:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a New Field to Attribute Table</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741694#M19717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; I am basically using VBA within the VB Macro Editor in ArcMap.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Before you use VBA, are you aware that it is in its death throws? In version 10.0 it is a separate installation and code can no longer be placed in a normal.mxt so that any tools are available in all maps. You have to cut and paste the code into each map document. In version 10.1 VBA will be gone altogether.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have 10, or will be moving to it soon, then it would make a lot of sense to look at using Visual Studio 2008 Express and the new Add-ins. If you know VB/VBA then VB.net should work for you. Another option, if you don't need user interface interaction, is to use Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That said, if you're going to be on 9.3 for a while, might as well stick with VBA for now. There are some good examples in the online 9.3 VBA SDK documentation:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisdesktop/com/vba_start.htm"&gt;http://resources.esri.com/help/9.3/arcgisdesktop/com/vba_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The interfaces of interest are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFields&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFieldsEdit&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IField&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IFieldEdit&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* pay attention to the plurals *&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set Fields to your existing fields. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cast it to FieldsEdit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Add a new Field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cast it to FieldEdit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set the properties of FieldEdit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And add the field with FieldsEdit.AddField(Field);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that gets you started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Nov 2010 16:27:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/adding-a-new-field-to-attribute-table/m-p/741694#M19717</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2010-11-19T16:27:53Z</dc:date>
    </item>
  </channel>
</rss>

