<?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: Facing Problem while Join managment through Python in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151848#M491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: miao6798&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to create a layer first then use the layer as input for AddJoin tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = arcpy.MakeFeatureLayer_management('featureClassName', lyr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(lyr, 'column1', joinTable, 'column2','KEEP_COMMON')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000064000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000064000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;The input must be a feature layer, a table view, or a raster layer that has an attribute table; it cannot be a feature class or table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006p000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006p000000&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management (in_features, out_layer, {where_clause}, {workspace}, {field_info})&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Apr 2013 20:32:41 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-04-29T20:32:41Z</dc:date>
    <item>
      <title>Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151843#M486</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 am automating LAYER dissolve process through pyhthon almost done.But faced some strange thing today.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While running the python script from ARCMAP every thing is running fine(PFA screenshot), but when I am running same script from PYSCRIPTER or COMMAND Prompt. It shows me Error 000840.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While I am abel to loacte the new created Feature table through catalog, any Idea for same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Following is the Script for same&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# PermanentJoin.py&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Purpose: Join two fields from a table to a feature class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Author: ESRI&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Import system modules&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the local parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;conStr=r"C:\Users\174314\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\SDE@ME5P.sde"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the current workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = conStr&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;levelNameIntial="AZ_US_"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alignment_id=111113&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;joinField = "ZIP"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;joinTable = r"C:\PythonScripts\CSV\lilly_iAlign_10_qc.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;csvFileName="lilly_iAlign_10_qc.Csv."&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fieldList = []&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;levelStartCounter=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;levelFielStartCounter=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;totLevel=5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapEnviornment="QC"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alignmentDataJoinField="zip_code"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#outWorkspace = "c:/Output/output.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outWorkSpace=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dissolveFieldName=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alignmentDatotLeveltaJoinField="ZIP_CODE"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;baseZipPoly='SDE.C_ZIP_POLY_2008_ESRI'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxdFilePath=r'C:\GISWORKAREA\Python'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Set Qualified name to fase for ommiting longer column name&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.qualifiedFieldNames = False&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;symbFilePath=r'C:\PythonScripts\Symbology'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;connectionFilePath = r'C:\Users\174314\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\CTSUSADCGISPOC.ags'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def CreateFeatureDataSet(connectiontr,dataSetname):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Feature Dataset creation process start'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr=""&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = arcpy.Describe(baseZipPoly).spatialReference&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CreateFeatureDataset_management(conStr, dataSetname, sr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; except IOError:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Fail to Create Dataset', sys.exc_info()[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Feature Dataset creation process start Dataset Name-' + dataSetname&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def CreateZipPoly(baseZipPoly,dissolveTableName):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("ZIP Poly file Creation Start")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Copy_management(baseZipPoly,dissolveTableName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #print(dissolveTableName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Unexpected error While copying ZIP Poly:", sys.exc_info()[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("ZIP Poly file Creation End")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Creating FeatureDatset&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def JoinTable(dissolveTableName,joinField,joinTable, alignmentDataJoinField):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print("Joining Process Start" + dissolveTableName + joinTable)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(dissolveTableName,joinField,joinTable, alignmentDataJoinField,"KEEP_COMMON")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Unexpected error While Joining data:", sys.exc_info()[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'Join process end'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dataSet_name = levelNameIntial + mapEnviornment + "_" + str(alignment_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;outWorkSpace = os.path.join(conStr, dataSet_name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dissolveTableName=levelNameIntial + mapEnviornment +&amp;nbsp; "_ZIP_POLY_" + str(alignment_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dissolveTableName=os.path.join(outWorkSpace, dissolveTableName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Create Data Set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CreateFeatureDataSet(conStr,dataSet_name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Create a new ZIP Poly by copying from one existing please ensure baseZipPoly is exist on current schema&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CreateZipPoly(baseZipPoly,dissolveTableName)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#Append SDE in front of Dissolve Table for join process&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dissolveTableName= "SDE." + levelNameIntial +mapEnviornment +&amp;nbsp; "_ZIP_POLY_" + str(alignment_id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#Join Process&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;JoinTable(dissolveTableName,joinField,joinTable, alignmentDataJoinField)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 05:09:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151843#M486</guid>
      <dc:creator>MatthewWeed</dc:creator>
      <dc:date>2013-04-02T05:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151844#M487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Cogni_Rx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am simplifying problem bit more&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This line is working perfectly while I am executing python script from ARCMAP&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(os.path.join(conStr,'SDE.AZ_US_QC_ZIP_POLY_1111146'),'ZIP','C:\\PythonScripts\\CSV\\lilly_iAlign_10&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But while I am running following script through COMMAND PROMPT,it's showing me error mentiond earlier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; module1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Purpose:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Author:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Created:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02/04/2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Copyright:&amp;nbsp;&amp;nbsp; (c) 174314 2013&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Licence:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;your licence&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#-------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;from arcpy import env&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import sys&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;conStr=r"C:\Users\174314\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\SDE@ME5P.sde"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;joinTable = r"C:\PythonScripts\CSV\lilly_iAlign_10_qc.csv"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;# Set the current workspace&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;env.workspace = conStr&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;def main():&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(os.path.join(conStr,'SDE.AZ_US_QC_ZIP_POLY_1111146'),'ZIP','C:\\PythonScripts\\CSV\\lilly_iAlign_10_qc.csv', 'ZIP_CODE',"KEEP_COMMON")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if __name__ == '__main__':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; main()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2013 08:27:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151844#M487</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-02T08:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151845#M488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would never attempt to use a CSV file as an input table. There are just too many things to go wrong with the schema. Invalid fields names, incorrect guesses of fields types and null values. There are clearly differences when using the interactive interface in ArcMap, it must do a bit more validation such as checking for indexes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first thing is to define a schema for the CSV using the Microsoft schema.ini definition. This helps the software stop having to guess the format of the CSV. Then it will load the rows into a nicely defined table with valid field names, instead of all numbers being floats and all strings being 255 characters.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Next, copy the temporary virtual "CSV-table" into a Real Database table, such as a file geodatabase using CopyRows, something that can have a primary unique indexed key. Your join key can also be indexed and validated. For example if it is supposed to be an integer, if the field is defined as a float the join will not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now your JoinField tool has a chance of working.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Apr 2013 07:57:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151845#M488</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2013-04-03T07:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151846#M489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Cogni_Rx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Kim,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reply, but I think there is some gap actually this script is running fine while I am executing this from ARCMAP python editor,but when I am executing this from command prompt then the error is comming so question is I am missing some point to run this script from command prompt?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Apr 2013 08:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151846#M489</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-10T08:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151847#M490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, if you run from the command prompt you will not be using a Layer and will not have a selection. You will be accessing the featureclass directly because it happens to have the same name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try renaming the layer different from the featureclass, run in Python window and then run the same script from the command line. It will fail with an error message "no such featureclass".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get the same count you would have to save the layer to a file while it has a selection and then reference that layer file (a definition of a featureclass with selection) in the command line.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2013 08:39:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151847#M490</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2013-04-11T08:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Facing Problem while Join managment through Python</title>
      <link>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151848#M491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: miao6798&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to create a layer first then use the layer as input for AddJoin tool:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = arcpy.MakeFeatureLayer_management('featureClassName', lyr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AddJoin_management(lyr, 'column1', joinTable, 'column2','KEEP_COMMON')&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000064000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//001700000064000000&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;The input must be a feature layer, a table view, or a raster layer that has an attribute table; it cannot be a feature class or table.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006p000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00170000006p000000&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.MakeFeatureLayer_management (in_features, out_layer, {where_clause}, {workspace}, {field_info})&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 20:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/facing-problem-while-join-managment-through-python/m-p/151848#M491</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-04-29T20:32:41Z</dc:date>
    </item>
  </channel>
</rss>

