<?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: Embedding data in an esriAddIn in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357640#M9460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are writing .NET add-in projects, the options for retrieving application related data/configuration files should be similar to any regular .NET projects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First option si to add the data files to your project and mark their "Copy To Output Directory" property to "Copy Always" so the build process will copy the files to the build output folder (i.e. where your assembly output is). In your code, you can use the relative path to the add-in assembly to access the files. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is to use embedded resource.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that these two options above are mainly for shipping "static" data files alongside with your add-in. If you need to retrieve/store user settings, you should consider writing the files to an appropriate AppData folder.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Jul 2010 17:39:19 GMT</pubDate>
    <dc:creator>EagerIp</dc:creator>
    <dc:date>2010-07-30T17:39:19Z</dc:date>
    <item>
      <title>Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357638#M9458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The ArcObjects documentation under "Advanced add-in concepts" states:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;You can create additional folders and files under the Install folder. This is useful in cases where you want to ship data as part of your add-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone provide details or a complete example how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 20:04:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357638#M9458</guid>
      <dc:creator>phenderson</dc:creator>
      <dc:date>2010-07-27T20:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357639#M9459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The ArcObjects documentation under "Advanced add-in concepts" states:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;You can create additional folders and files under the Install folder. This is useful in cases where you want to ship data as part of your add-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Can anyone provide details or a complete example how to do this?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not exactly what you want, but if you only needed a few paths that can be changed by the user and stored (application settings),&amp;nbsp; If you are using VB.net you can use the My.settings property of VB.net.&amp;nbsp; It stores values in an xml, in this case its the app.config which goes with the add-in.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in Visual Studio, go to the Project Properties page:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Project-&amp;gt; Properties-&amp;gt; Settings&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here you can add any values you want as names with a choice of string, integer, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;make a variable, say "user_name", string&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you access them like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My.Settings.user_name = "Ground Hogg"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dim pName = My.Settings.user_name&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;save settings with&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My.Settings.save()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using about 10 in my project, all strings to hold paths to data sets.&amp;nbsp; Seems to be working just fine for my Button "add-In", but I have not distributed it yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sadly, Ive read it doesn't work for C#.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;edited: misread original question, not a solution for the original post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 22:02:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357639#M9459</guid>
      <dc:creator>GroundHogg</dc:creator>
      <dc:date>2010-07-27T22:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357640#M9460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are writing .NET add-in projects, the options for retrieving application related data/configuration files should be similar to any regular .NET projects.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First option si to add the data files to your project and mark their "Copy To Output Directory" property to "Copy Always" so the build process will copy the files to the build output folder (i.e. where your assembly output is). In your code, you can use the relative path to the add-in assembly to access the files. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another option is to use embedded resource.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that these two options above are mainly for shipping "static" data files alongside with your add-in. If you need to retrieve/store user settings, you should consider writing the files to an appropriate AppData folder.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 17:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357640#M9460</guid>
      <dc:creator>EagerIp</dc:creator>
      <dc:date>2010-07-30T17:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357641#M9461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So what's the correct way to reference an included file? In my project I have a config folder and inside of it a config.xml file with some settings in it. The xml file is set to Copy Always to the output directory, and if I unzip the resulting .esriAddIn I can see the folder and the file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I try to reference the file as "config/config.xml", I get an error at runtime because VB is looking for the file relative to the ArcGIS bin directory, not the add-in. Is there some way to reference the location in the add-in, especially since it's a zip and might be all in memory?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 20:03:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357641#M9461</guid>
      <dc:creator>RandyHauser</dc:creator>
      <dc:date>2011-02-03T20:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357642#M9462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There was another thread about this. You need to get the directory of the AddIn assembly. Check the last post and see if it helps:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/17397-Add-In-embedded-Files-and-use-it-s-path"&gt;http://forums.arcgis.com/threads/17397-Add-In-embedded-Files-and-use-it-s-path&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 20:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357642#M9462</guid>
      <dc:creator>JeffreyHamblin</dc:creator>
      <dc:date>2011-02-03T20:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Embedding data in an esriAddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357643#M9463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, found it right before you posted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also see this Stack Overflow thread:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/52797/c-how-do-i-get-the-path-of-the-assembly-the-code-is-in"&gt;http://stackoverflow.com/questions/52797/c-how-do-i-get-the-path-of-the-assembly-the-code-is-in&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Feb 2011 20:25:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/embedding-data-in-an-esriaddin/m-p/357643#M9463</guid>
      <dc:creator>RandyHauser</dc:creator>
      <dc:date>2011-02-03T20:25:24Z</dc:date>
    </item>
  </channel>
</rss>

