<?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 import a shape file in the layer using a link? in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/how-to-import-a-shape-file-in-the-layer-using-a/m-p/613504#M34602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap I have got lines. These shape lines, with a field with the 'line number' (1234), are connected points. The unconnected points are in separate shape files on the harddisk. These files are named after the line number (e.g. 1234_points_shp). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I have managed to create a hyperlink using the field calculator, however, then it opens the file in a different software. I would rather have ArcMap open the shape file in the layer in which I am working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how can this be done? I saw that it is possible to edit the script, but I have no experience with this, so maybe you can help me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guido&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: I do not know whether this is the right topic to ask this question in. If so, my appologies, please send me in the right directoin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Oct 2012 09:17:54 GMT</pubDate>
    <dc:creator>guidoSCHAEPMAN</dc:creator>
    <dc:date>2012-10-31T09:17:54Z</dc:date>
    <item>
      <title>how to import a shape file in the layer using a link?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-to-import-a-shape-file-in-the-layer-using-a/m-p/613504#M34602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap I have got lines. These shape lines, with a field with the 'line number' (1234), are connected points. The unconnected points are in separate shape files on the harddisk. These files are named after the line number (e.g. 1234_points_shp). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, I have managed to create a hyperlink using the field calculator, however, then it opens the file in a different software. I would rather have ArcMap open the shape file in the layer in which I am working. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how can this be done? I saw that it is possible to edit the script, but I have no experience with this, so maybe you can help me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guido&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOTE: I do not know whether this is the right topic to ask this question in. If so, my appologies, please send me in the right directoin.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Oct 2012 09:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-to-import-a-shape-file-in-the-layer-using-a/m-p/613504#M34602</guid>
      <dc:creator>guidoSCHAEPMAN</dc:creator>
      <dc:date>2012-10-31T09:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a shape file in the layer using a link?</title>
      <link>https://community.esri.com/t5/data-management-questions/how-to-import-a-shape-file-in-the-layer-using-a/m-p/613505#M34603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dear All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the mean time I have had a reply from the ArcGis support (see below). I think it is a nice lead, however, I do not have python&amp;nbsp;&amp;nbsp; scripting experience. Can you please send me in the right direction? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;* Where and how do I specify in which directory the shape files with the points are?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Where and how do I specify that the filename is the same as the attribute field name 'LINE_NR'?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* Can I use this script in the field calculator?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Kind regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Guido&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;--------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Guido,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately I could not find a ready-to-use script to accomplish this. Writing code is beyond the scope of technical support.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a python script which you can use as an example to load the shapefiles programmatically through to the table of contents:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/4017896/how-do-i-add-a-shapefile-in-arcgis-via-python-scripting"&gt;http://stackoverflow.com/questions/4017896/how-do-i-add-a-shapefile-in-arcgis-via-python-scripting&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy.mapping&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# get the map document &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# get the data frame &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd,"*")[0]&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# create a new layer &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;newlayer = arcpy.mapping.Layer(theShape)&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# add the layer to the map at the bottom of the TOC in data frame 0 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.mapping.AddLayer(df, newlayer,"BOTTOM")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Refresh things&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshTOC()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd, df, newlayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe this can be a first step towards a solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2012 07:06:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/how-to-import-a-shape-file-in-the-layer-using-a/m-p/613505#M34603</guid>
      <dc:creator>guidoSCHAEPMAN</dc:creator>
      <dc:date>2012-11-12T07:06:18Z</dc:date>
    </item>
  </channel>
</rss>

