<?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: Layer.UpdateFeatures(); Layer.SaveFeatureChanges() is Slow in AutoCAD Map 3D Developer Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330739#M2136</link>
    <description>&lt;P&gt;I found a documentation site that explains this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wikihelp.autodesk.com/AutoCAD_Map_3D/enu/2012/Help/0000-AutoCAD_0/0015-Feature_15/0029-Updating29/0030-Edit_Set30" target="_blank"&gt;http://wikihelp.autodesk.com/AutoCAD_Map_3D/enu/2012/Help/0000-AutoCAD_0/0015-Feature_15/0029-Updating29/0030-Edit_Set30&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the featureservice method but the problem is AutoCAD does not update the layer correctly. It saves the data to the datasource but then AutoCAD re-overwrites it and I end up losing data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After my command to updateFeatures I would have to refresh each layer which takes longer then the "Edit Set" method from the above link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2012 00:40:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-02-14T00:40:28Z</dc:date>
    <item>
      <title>Layer.UpdateFeatures(); Layer.SaveFeatureChanges() is Slow</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330425#M2134</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with the AutoDesk Geospatial platform API to connect to a SQL2008 spatial database. I have my application working but whenever I try to add/update features and save the changes it takes a long time. It takes about 5 seconds which making a user wait five seconds to add a feature is too long.&lt;/P&gt;&lt;P&gt;Is this the right approch to add features or is there another method to update features and then save to the database?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a section of my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MgFeatureCommandCollection commands = new MgFeatureCommandCollection();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;commands.Add(new MgInsertFeatures(MyPointLayer.FeatureClassName, propcol));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MyPointLayer.UpdateFeatures(commands);&lt;BR /&gt;&lt;BR /&gt;MyPointLayer.SaveFeatureChanges(options);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any insight would be appricated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;-Troy&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 21:14:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330425#M2134</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-13T21:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Layer.UpdateFeatures(); Layer.SaveFeatureChanges() is Slow</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330557#M2135</link>
      <description>&lt;P&gt;I think you don't have to call SaveChanges method on layer and did you try updating features like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AcMapFeatureService fs = AcMapServiceFactory.GetService(MgServiceType.FeatureService) as AcMapFeatureService;

fs.UpdateFeatures(new MgResourceIdentifier(layer.FeatureSourceId), commands, false);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 22:05:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330557#M2135</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-13T22:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Layer.UpdateFeatures(); Layer.SaveFeatureChanges() is Slow</title>
      <link>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330739#M2136</link>
      <description>&lt;P&gt;I found a documentation site that explains this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://wikihelp.autodesk.com/AutoCAD_Map_3D/enu/2012/Help/0000-AutoCAD_0/0015-Feature_15/0029-Updating29/0030-Edit_Set30" target="_blank"&gt;http://wikihelp.autodesk.com/AutoCAD_Map_3D/enu/2012/Help/0000-AutoCAD_0/0015-Feature_15/0029-Updating29/0030-Edit_Set30&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the featureservice method but the problem is AutoCAD does not update the layer correctly. It saves the data to the datasource but then AutoCAD re-overwrites it and I end up losing data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After my command to updateFeatures I would have to refresh each layer which takes longer then the "Edit Set" method from the above link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 00:40:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-map-3d-developer-forum/layer-updatefeatures-layer-savefeaturechanges-is-slow/m-p/3330739#M2136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-02-14T00:40:28Z</dc:date>
    </item>
  </channel>
</rss>

