<?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 do I get the file path of a shapefile or layer loaded in mxd? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144439#M3762</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kirk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to figure out what I needed based on the link you sent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mario&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 May 2010 20:52:16 GMT</pubDate>
    <dc:creator>MarioSuau</dc:creator>
    <dc:date>2010-05-14T20:52:16Z</dc:date>
    <item>
      <title>How do I get the file path of a shapefile or layer loaded in mxd?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144437#M3760</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;I'm developing using the ArcGIS 9.3 Engine Developer Kit for .net (C#).&amp;nbsp; I'm using the map control and I have the need to get the actual file path of a shapefile or layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap, I can right click on a layer and go to Properties-&amp;gt;Source tab.&amp;nbsp; From there I see the Data source info which includes the path to the shapefile, etc.&amp;nbsp; I'd like to do something similar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone know how to get to this layer or shapefile path information? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mario Suau&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Federal Signal Codespear&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 21:42:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144437#M3760</guid>
      <dc:creator>MarioSuau</dc:creator>
      <dc:date>2010-05-12T21:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the file path of a shapefile or layer loaded in mxd?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144438#M3761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;see &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=161969&amp;amp;g=1#474431"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=161969&amp;amp;g=1#474431&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 21:46:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144438#M3761</guid>
      <dc:creator>KirkKuykendall</dc:creator>
      <dc:date>2010-05-12T21:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the file path of a shapefile or layer loaded in mxd?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144439#M3762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kirk,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to figure out what I needed based on the link you sent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mario&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 20:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144439#M3762</guid>
      <dc:creator>MarioSuau</dc:creator>
      <dc:date>2010-05-14T20:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the file path of a shapefile or layer loaded in mxd?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144440#M3763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;had the same issue and looked at the link provided. here is how to do it given an object that can be cast as an IFeatureLayer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private string FullPathOfLayer(object Item)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; string fullPath = "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; IFeatureLayer ifl = Item as IFeatureLayer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; IDataset ds = ifl.FeatureClass as IDataset;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fullPath += ds.Workspace.PathName;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fullPath += @"\" + ds.Name;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (ifl.DataSourceType.ToLower().Contains("shapefile"))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fullPath += ".shp";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return fullPath;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 12:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-do-i-get-the-file-path-of-a-shapefile-or-layer/m-p/144440#M3763</guid>
      <dc:creator>JoxueOx</dc:creator>
      <dc:date>2010-05-28T12:46:28Z</dc:date>
    </item>
  </channel>
</rss>

