AnsweredAssumed Answered

arcpy.mapping.AddLayer (SDE Feature Class)

Question asked by jamesfreddyc on Apr 17, 2013
Latest reply on Apr 19, 2013 by jamesfreddyc
When adding an ArcSDE Feature Class to an .mxd, it only shows the first 3 letters of the name in the TOC. 

     arcpy.env.workspace = "C:\\Users\\me\\AppData\\Roaming\ESRI\\Desktop10.1\\ArcCatalog\\mysdeserver.sde"     sdelist = arcpy.ListFeatureClasses()     for sdeFC in sdelist:         ## locate the desired fc and add it to the TOC         if sdeFC == 'GIS.THE_FEATURE_CLASS_NAME':             sdeLyr = arcpy.mapping.Layer(sdeFC)             arcpy.mapping.AddLayer(df, sdeLyr, "BOTTOM")             arcpy.mapping.AddLayer             arcpy.RefreshTOC()        


The above code adds the feature class but it adds it with the name "GIS".  Am I completely using the wrong method (I don't see any other way).  Solution?  Comments?


Thanks!

Outcomes