<?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: Feature Constructors in ArcGIS Mobile in ArcGIS for Windows Mobile Questions</title>
    <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90641#M437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to follow up on this in case anyone else is having problems...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I contacted support here in the UK and the only Feature constructor we could get working between us was:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;new Feature(FeatureType, null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then set all the attributes one by one from a FeatureDataReader for the existing feature, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature f = new Feature(FeatureType, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (Int32 i = 0; i &amp;lt; featureReader.FieldCount; i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string columnName = featureReader.GetName(i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = featureReader[columnName];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.FeatureDataRow[columnName] = o;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrongly assumed that this would create a new row in the dataset each time I just wanted to edit an existing feature. Pretty cumbersome and entirely un-documented (a bug report has been submitted against the documentation).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2011 14:30:58 GMT</pubDate>
    <dc:creator>AndrewCorcoran</dc:creator>
    <dc:date>2011-10-31T14:30:58Z</dc:date>
    <item>
      <title>Feature Constructors in ArcGIS Mobile</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90638#M434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having major problems creating new Feature instances using either of the following constructors:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;new Feature(FeatureLayerInfo, int)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;new Feature(FeatureDataRow)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to create an instance from an existing data row so that I can pass it to an EditFeatureAttributesPage to re-edit the feature. This works when going through the normal workflow using the ArcGIS Mobile application but doesn't when I'm doing it programmatically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've checked that all the attributes for the feature have a value but I still get either:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Object reference not set to an instance of an object." in the "SetProperties" method of Feature when usng the first constructor&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Value does not fall within the expected range." in the constructor of Feature when using the second constructor&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone any ideas what I can do to work out what is going wrong?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 08:12:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90638#M434</guid>
      <dc:creator>AndrewCorcoran</dc:creator>
      <dc:date>2011-10-12T08:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Constructors in ArcGIS Mobile</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90639#M435</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;This might not be related.&amp;nbsp; However, I've experienced problems creating a Feature object from a FeatureDataReader when the feature in question is not symbolised in the map document.&amp;nbsp; If there is not a specific symbol defined for a feature the "All Other Values" symbolisation needs to be enabled in order to return a valid Feature object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 08:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90639#M435</guid>
      <dc:creator>StephenDickinson</dc:creator>
      <dc:date>2011-10-12T08:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Constructors in ArcGIS Mobile</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90640#M436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's definitely not related to that issue though as my feature is a polygon displayed on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it may be related to using Guids as attribute values as I've tried my feature class minus all the attributes other than two Guid columns and I still get the same error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Oct 2011 10:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90640#M436</guid>
      <dc:creator>AndrewCorcoran</dc:creator>
      <dc:date>2011-10-12T10:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Constructors in ArcGIS Mobile</title>
      <link>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90641#M437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just to follow up on this in case anyone else is having problems...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I contacted support here in the UK and the only Feature constructor we could get working between us was:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;new Feature(FeatureType, null)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and then set all the attributes one by one from a FeatureDataReader for the existing feature, i.e.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature f = new Feature(FeatureType, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for (Int32 i = 0; i &amp;lt; featureReader.FieldCount; i++)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; string columnName = featureReader.GetName(i);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; object o = featureReader[columnName];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; f.FeatureDataRow[columnName] = o;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I wrongly assumed that this would create a new row in the dataset each time I just wanted to edit an existing feature. Pretty cumbersome and entirely un-documented (a bug report has been submitted against the documentation).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2011 14:30:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-for-windows-mobile-questions/feature-constructors-in-arcgis-mobile/m-p/90641#M437</guid>
      <dc:creator>AndrewCorcoran</dc:creator>
      <dc:date>2011-10-31T14:30:58Z</dc:date>
    </item>
  </channel>
</rss>

