<?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: Embed png in layout using addin in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080134#M6868</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have found the right ProGuide page. How to access&amp;nbsp; add-in resources you can find in&amp;nbsp;&lt;STRONG&gt;Accessing document content&lt;/STRONG&gt;&amp;nbsp;chapter. First step gives you folder path of your resource file, second constructs full path of your resource. Remember to specify document content as described in chapter above.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jul 2021 05:38:30 GMT</pubDate>
    <dc:creator>GKmieliauskas</dc:creator>
    <dc:date>2021-07-19T05:38:30Z</dc:date>
    <item>
      <title>Embed png in layout using addin</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080053#M6867</link>
      <description>&lt;P&gt;I would like to add a picture (basically a company logo in png or jpg format) to new programmatically-created layouts.&amp;nbsp; I would like to embed the picture files within the addin so that users do not have to download or save the pictures to their machines.&amp;nbsp; More importantly, I need to reference the pictures where they are saved within the addin.&amp;nbsp; When trying to add a new graphic element, the only time it adds a picture is when the file path is hard coded to a location on disk. In no circumstance have I ever successfully accessed the picture file stored within the add-in.&amp;nbsp; Any advice or directions would be very much appreciated.&lt;/P&gt;&lt;P&gt;I've spent extensive time here: &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#images-as-embedded-resources," target="_blank"&gt;https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-content-and-image-resources#images-as-embedded-resources,&lt;/A&gt; but for the life of me I can not figure out how to reference/access those embedded image resources when I want to add them on a layout.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jul 2021 05:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080053#M6867</guid>
      <dc:creator>GregC</dc:creator>
      <dc:date>2021-07-18T05:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Embed png in layout using addin</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080134#M6868</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You have found the right ProGuide page. How to access&amp;nbsp; add-in resources you can find in&amp;nbsp;&lt;STRONG&gt;Accessing document content&lt;/STRONG&gt;&amp;nbsp;chapter. First step gives you folder path of your resource file, second constructs full path of your resource. Remember to specify document content as described in chapter above.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jul 2021 05:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080134#M6868</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2021-07-19T05:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Embed png in layout using addin</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080877#M6873</link>
      <description>&lt;P&gt;I tried this and found that the Url parameter for CreatePictureGraphicElement is limited as it doesn't support pack Uris as input.&amp;nbsp; I was able to get it to work by setting the 'Build' action for my embedded picture to 'Content' and the 'Copy to Output' to 'Copy if newer'.&amp;nbsp; This will unzip the actual jpg in my add-in folder as soon as the add-in is loaded by Pro and i can access the image via a 'local path'.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1626795043018.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/18951i811574DD83AA3AC6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1626795043018.png" alt="Wolf_0-1626795043018.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I attached my sample for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 15:35:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1080877#M6873</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-07-20T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Embed png in layout using addin</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1081616#M6905</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;and &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp; - Thank you both for your help!&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;- your sample code was exactly what I needed.&amp;nbsp; Interestingly, I still couldn't navigate to the "MyImages/Shark.JPG", but I could find it in "Resources/Shark.JPG".&amp;nbsp; I'll mess around with it tomorrow, but for now I've got code that works!&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 02:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1081616#M6905</guid>
      <dc:creator>GregC</dc:creator>
      <dc:date>2021-07-22T02:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Embed png in layout using addin</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1081790#M6910</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/497303"&gt;@GregG&lt;/a&gt;&amp;nbsp; It depends on the 'build action' that you specify in the image's properties.&amp;nbsp; Your property probably has a build action of 'Resource' versus 'Content'.&amp;nbsp; When you specify resource the image will be embedded into your assembly as a resource and is available under 'Resources...'.&amp;nbsp; If you specify 'Content' (with an appropriate copy action) the esriaddinx will contain the jpg image file under the folder structure you use in your project file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1626968652128.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19140i1F705F779A91F60E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1626968652128.png" alt="Wolf_0-1626968652128.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can verify that the image files get attached to the esriaddinx file by 'unzipping' the file and looking into the 'Install' folder.&amp;nbsp; You should see your jpgs under that folder:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_1-1626968857814.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19141iC992E50202A7BFC1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_1-1626968857814.png" alt="Wolf_1-1626968857814.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jul 2021 15:47:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/embed-png-in-layout-using-addin/m-p/1081790#M6910</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-07-22T15:47:08Z</dc:date>
    </item>
  </channel>
</rss>

