<?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 to copy an IMap using C# ? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496351#M13341</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to replace the map on the second form with the map from the first form then you can use IObjectCopy to create a deep clone of the Map.&amp;nbsp; If want to keep the map on the second form and simply add the elements from the other map to it, then you would need to loop through the elements in the first map and add them to the second map.&amp;nbsp; You may need to use IObjectCopy to deep clone the elements and add the clones to the second map to avoid reference issues.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Oct 2012 16:16:34 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2012-10-09T16:16:34Z</dc:date>
    <item>
      <title>How to copy an IMap using C# ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496349#M13339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi friends,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having an IMap object on Form 1. This Imap (got from ActiveView.FocusMap()) includes elements that created by the statements: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;IGraphicsContainer oGraphics = map as IGraphicsContainer;&lt;BR /&gt;oGraphics.AddElement(oElement, 0);&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-style: italic;"&gt;The Imap don't have layers. &lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know how can I copy this Imap (its elements) to another Imap on another form (Form 2) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tai&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2012 02:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496349#M13339</guid>
      <dc:creator>TaiBui</dc:creator>
      <dc:date>2012-10-07T02:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy an IMap using C# ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496350#M13340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can't clone the map itself.&amp;nbsp; The only way I see this working, is looping through all the elements in one map and cloning them and adding them to the other map.&amp;nbsp; However a map is a lot more than layers and a graphicscontainer.&amp;nbsp; There are many properties that would need cloning.&amp;nbsp; You could also create a stream and use the map's Ipersiststream to save the map to the stream and then load it back into a different map object.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 13:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496350#M13340</guid>
      <dc:creator>AlexanderGray</dc:creator>
      <dc:date>2012-10-09T13:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy an IMap using C# ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496351#M13341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to replace the map on the second form with the map from the first form then you can use IObjectCopy to create a deep clone of the Map.&amp;nbsp; If want to keep the map on the second form and simply add the elements from the other map to it, then you would need to loop through the elements in the first map and add them to the second map.&amp;nbsp; You may need to use IObjectCopy to deep clone the elements and add the clones to the second map to avoid reference issues.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 16:16:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496351#M13341</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-10-09T16:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy an IMap using C# ?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496352#M13342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes. Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Oct 2012 00:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-an-imap-using-c/m-p/496352#M13342</guid>
      <dc:creator>TaiBui</dc:creator>
      <dc:date>2012-10-10T00:05:14Z</dc:date>
    </item>
  </channel>
</rss>

