<?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 duplicate an event layer to a new shapefile? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634358#M17101</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;try this :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Export the event layer to [shapefile_name].shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.create a layer file ([shapefile_name].lyr) from the event layer (it includes all definitions : Symbology, labels, ...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.load the new [shapefile_name].lyr into your map&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4.change the data source of the layer added from event_layer to the shapefile_name.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; (open the new featureclass and assign it to the featurelayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFClass = pFworkspace.openfeatureclass(....)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFLayer.featureclass = pFClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5.refresh the map and the legend&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;good luck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Nov 2010 08:20:09 GMT</pubDate>
    <dc:creator>mohamedkenzi</dc:creator>
    <dc:date>2010-11-02T08:20:09Z</dc:date>
    <item>
      <title>How can I duplicate an event layer to a new shapefile?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634356#M17099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to copy an event layer to a new feature layer with the same properties (i.e. duplicate the features, the symbology and the labeling properties). I need to do all this through ArcObjects VBA code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can manage to copy the features and I can copy the symbology, but I am having a hard time copying the labeling properties. My questions are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;OL&gt;&lt;BR /&gt;&lt;LI&gt;Do I need to copy the features, symbology and labeling separately? Or is it possible to do all this at once? And if so, how?&lt;/LI&gt;&lt;BR /&gt;&lt;LI&gt;If I have to copy the features, symbology and labeling separately, then how can I copy the labeling from the event layer to the new feature layer? I have been trying this, but I have no clue on how to approach this (i.e. the approaches I tried don't work).&lt;/LI&gt;&lt;BR /&gt;&lt;/OL&gt;&lt;SPAN&gt;I expressly didn't add any code here. I hope you guys may have a fresh view on the best way to tackle this. That may be more useful than getting comments on my current approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will appreciate any help greatly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martijn Senden.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Nov 2010 10:52:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634356#M17099</guid>
      <dc:creator>MartijnSenden</dc:creator>
      <dc:date>2010-11-01T10:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I duplicate an event layer to a new shapefile?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634357#M17100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please let me know if more clarification is needed. I would still appreciate any help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martijn Senden&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 07:52:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634357#M17100</guid>
      <dc:creator>MartijnSenden</dc:creator>
      <dc:date>2010-11-02T07:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I duplicate an event layer to a new shapefile?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634358#M17101</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;try this :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Export the event layer to [shapefile_name].shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.create a layer file ([shapefile_name].lyr) from the event layer (it includes all definitions : Symbology, labels, ...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.load the new [shapefile_name].lyr into your map&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4.change the data source of the layer added from event_layer to the shapefile_name.shp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; (open the new featureclass and assign it to the featurelayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFClass = pFworkspace.openfeatureclass(....)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFLayer.featureclass = pFClass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5.refresh the map and the legend&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;good luck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Nov 2010 08:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-can-i-duplicate-an-event-layer-to-a-new/m-p/634358#M17101</guid>
      <dc:creator>mohamedkenzi</dc:creator>
      <dc:date>2010-11-02T08:20:09Z</dc:date>
    </item>
  </channel>
</rss>

