<?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 How to copy certain area from map? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185071#M4822</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Gurus!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have certain activeView on axMapControl (c# vs 2010 arcengine 2010) and want to copy certain area in powerPoint or Word document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How I can copy the desired area , for example , in clipboard? Any reference, please? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2012 05:45:00 GMT</pubDate>
    <dc:creator>AnatoliiTerentiev</dc:creator>
    <dc:date>2012-06-19T05:45:00Z</dc:date>
    <item>
      <title>How to copy certain area from map?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185071#M4822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear Gurus!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have certain activeView on axMapControl (c# vs 2010 arcengine 2010) and want to copy certain area in powerPoint or Word document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How I can copy the desired area , for example , in clipboard? Any reference, please? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 05:45:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185071#M4822</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2012-06-19T05:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy certain area from map?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185072#M4823</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;It sounds like you want to export a map as an image, which you then want to use in PowerPoint or elsewhere.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following shows this being done.&amp;nbsp; The active view (IActiveView) can be the PageLayout or the Map, so this can be done for a map that displays in either a MapControl or PageLayoutControl in an ArcGIS Engine application you have developed.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Export active view (complete developer sample)&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Export_active_view/000100000026000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#/Sample_Export_active_view/000100000026000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The following snippet is easier to start with and may be all you need for exporting an active view, with adjustments, of course:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create JPEG (hi-resolution) from ActiveView Snippet &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0049000000nv000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0049000000nv000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create JPEG from ActiveView Snippet &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Create_JPEG_from_ActiveView_Snippet/004900000064000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Create_JPEG_from_ActiveView_Snippet/004900000064000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this can help you get started with programmatically getting the exported image in Window's Clipboard:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;List Files to Clipboard Snippet &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0049000000rt000000"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//0049000000rt000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also the approach of using something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.&amp;nbsp; IActiveView.Selection (returns an ISelection containing selected map features or selected graphic elements)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2.&amp;nbsp; ISelection.Copy (copies the selected items to the clipboard).&amp;nbsp; While I see you being able to paste graphic elements into an application other than ArcMap, I do not see map features copying.&amp;nbsp; This is why I suggest you exporting the map as an image and adding that to the clipboard.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3.&amp;nbsp; ISelection.Paste (copies the clipboard contents [in the activeview])&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2012 16:41:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185072#M4823</guid>
      <dc:creator>EdgarBejarano</dc:creator>
      <dc:date>2012-06-22T16:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy certain area from map?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185073#M4824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it the only way to copy ActiveView to clipboard - create Jpeg file and then copy it to clipboard?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is it possible to copy ActiveView to bitmap object?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 08:11:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185073#M4824</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2012-07-18T08:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy certain area from map?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185074#M4825</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;SPAN&gt;You can create .Net Bitmap object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; //parameter check&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; if (activeView == null )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ESRI.ArcGIS.Output.IExport export =new ExportBMPClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Microsoft Windows default DPI resolution&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; export.Resolution = 96;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ESRI.ArcGIS.Display.tagRECT exportRECT = activeView.ExportFrame;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ESRI.ArcGIS.Geometry.IEnvelope envelope = new ESRI.ArcGIS.Geometry.EnvelopeClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; envelope.PutCoords(exportRECT.left, exportRECT.top, exportRECT.right, exportRECT.bottom);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; export.PixelBounds = envelope;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; System.Int32 hDC = export.StartExporting();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; activeView.Output(hDC, (System.Int16)export.Resolution, ref exportRECT, null, null);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bitmap myImage = Image.FromHbitmap(new IntPtr((export as IExportBMP).Bitmap));&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; // Finish writing the export file and cleanup any intermediate files&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; export.FinishExporting();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; export.Cleanup();&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 13:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185074#M4825</guid>
      <dc:creator>DimaShats</dc:creator>
      <dc:date>2012-07-19T13:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy certain area from map?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185075#M4826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;And one more question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can copy only entire ActiveView? Can I copy some rectangle of ActiveView?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 11:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-copy-certain-area-from-map/m-p/185075#M4826</guid>
      <dc:creator>AnatoliiTerentiev</dc:creator>
      <dc:date>2012-07-23T11:50:51Z</dc:date>
    </item>
  </channel>
</rss>

