<?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: Arcpy MakeFeatureLayer_management Lyr name in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291339#M22571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved by using&amp;nbsp;arcpy.JoinField_management....... Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 May 2017 02:57:15 GMT</pubDate>
    <dc:creator>JorgePereira</dc:creator>
    <dc:date>2017-05-25T02:57:15Z</dc:date>
    <item>
      <title>Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291334#M22566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;I'm a complete noob at arcpy.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;I must do a college paper using arcpy. It’s a step by step thing and it takes much longer than expected &lt;/SPAN&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;J&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;I’ve got a question regarding the add join tool. From what I could find online, I need to make a feature layer to get the join working. I’ve achieved this, but always with a problem: I lose my feature name when converting it to a layer. Each new feature is named after the «joinFeaturesLyr» (adding a number) and not using the features in the database names. Is there a way to solve this? It’s been killing me for the las two days. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;This is the part of the script I mentioned. I tried to use the for&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: black;"&gt;arcpy.env.overwriteOutput = &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;True
&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;arcpy.env.workspace = tmp_GDB &amp;nbsp;&amp;nbsp;&amp;nbsp;#It's a gdb called tmp!
&lt;/SPAN&gt;&lt;EM style="color: #6c8c00;"&gt;#outputFcList = arcpy.ListFeatureClasses()&amp;nbsp;
#print outputFcList
 
 &lt;/EM&gt;&lt;STRONG style="color: navy;"&gt;for &lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;joinFeatures &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;in &lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;arcpy.ListFeatureClasses():
 &amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MakeFeatureLayer_management(joinFeatures, &lt;/SPAN&gt;&lt;STRONG style="color: green;"&gt;"joinFeaturesLyr"&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;)
 
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;print &lt;/STRONG&gt;&lt;STRONG style="color: green;"&gt;'Executing'
 
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;STRONG style="color: navy;"&gt;try&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(&lt;/SPAN&gt;&lt;SPAN style="color: #660099;"&gt;in_layer_or_view&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: green;"&gt;"joinFeaturesLyr"&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #660099;"&gt;in_field&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: green;"&gt;"MsLink_ODBC"&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #660099;"&gt;join_table&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;=catalogo, &lt;/SPAN&gt;&lt;SPAN style="color: #660099;"&gt;join_field&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: green;"&gt;"ligacao"&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;except &lt;/STRONG&gt;&lt;SPAN style="color: navy;"&gt;Exception &lt;STRONG&gt;as &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;err:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;print&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;(err.args[&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt;])
 
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;print ‘&lt;/STRONG&gt;&lt;STRONG style="color: green;"&gt;Exporting'&lt;/STRONG&gt;&lt;STRONG style="color: green;"&gt;
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;STRONG style="color: navy;"&gt;try&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.FeatureClassToGeodatabase_conversion(&lt;/SPAN&gt;&lt;STRONG style="color: green;"&gt;"joinFeaturesLyr"&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;, tmp_GDB)
 &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: navy;"&gt;except&lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;:
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;EM style="color: #6c8c00;"&gt;#arcpy.AddError('Script Error')
 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;STRONG style="color: navy;"&gt;print &lt;/STRONG&gt;&lt;SPAN style="color: black;"&gt;arcpy.GetMessages()
 &amp;nbsp;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.5pt; color: #3d3d3d;"&gt;Thank you!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:18:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291334#M22566</guid>
      <dc:creator>JorgePereira</dc:creator>
      <dc:date>2021-12-12T16:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291335#M22567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As they say, a picture is worth 1,000 words, sometimes more.&amp;nbsp; If you could provide a couple screenshots showing what you see and describing what you want/expect to see, it would be helpful.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 01:05:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291335#M22567</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-05-25T01:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291336#M22568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, Thank you for you swift answer.&amp;nbsp;I've tried it with Describe. Same issue&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/353976_pastedImage_1.png" style="width: 920px; height: 432px;" /&gt;&lt;/P&gt;&lt;P&gt;I wanted to have the same name of the input join features after the join. The problem is that, to have a join, I&amp;nbsp;need&amp;nbsp;to use the arcpy.MakeFeatureLayer_management.&amp;nbsp;I've been unable to&amp;nbsp;give each layer the name of the original feature. The join works, but in the end, instead of having a feature named T121502_A_pol_Polygon (and son on), the join features that result from the script are named (in this case) i_name_join (and so on). Is there a way to change the cript in order to get that result?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/353977_pastedImage_2.png" style="width: 232; height: 620;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 01:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291336#M22568</guid>
      <dc:creator>JorgePereira</dc:creator>
      <dc:date>2017-05-25T01:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291337#M22569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about:&amp;nbsp; arcpy.MakeFeatureLayer_management(i.name, i.name + "_join")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 02:08:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291337#M22569</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-05-25T02:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291338#M22570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also tried it. But the problem remains.&amp;nbsp;Maybe the picture isn't clear. The «i_name_join_*» features are the result of the script. The «T121502_**» are the input features. They are the ones de «describe» is getting. What I would want is to have in the end, if possible, is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;original inpuit feature name «T121502_A_pol_Polygon»; result of the script «T121502_A_pol_Polygon» and not what i'm getting - «i_name_join»&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm about to give up and use the result as is &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 02:16:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291338#M22570</guid>
      <dc:creator>JorgePereira</dc:creator>
      <dc:date>2017-05-25T02:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy MakeFeatureLayer_management Lyr name</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291339#M22571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Solved by using&amp;nbsp;arcpy.JoinField_management....... Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 02:57:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-makefeaturelayer-management-lyr-name/m-p/291339#M22571</guid>
      <dc:creator>JorgePereira</dc:creator>
      <dc:date>2017-05-25T02:57:15Z</dc:date>
    </item>
  </channel>
</rss>

