1

I believe this issue is is part of a bigger problem causing an issue with an arcpy script that I am trying to have run periodically to load data into ArcSDE feature classes using Append_management.

I have an ArcSDE database in SQL Server. From a .sde connection inside of the catalog pane in ArcMap (10.2). When connected as a user, it shows the feature classes that they can access as dbname.user.featureclass.

For instance mygeodatabase.FCowner.WaterLines , each feature class in the sde database looks like this, as expected. However when I drag the feature class into my mxd map area, the table of contents will say "WaterLines", then another featureclase might come into the .mxd as "mygeodatabase.FCowner.WaterPoints"

sup

Can anyone explain to me why this is? I'm not even sure if this is coming into play with the bigger issue I am having.

2

I'd say that some of the feature classes have an alias set, and others do not.

Go into ArcCatalog, and for the feature classes that come in with the full name, go into their properties. Check the general tab, and see if an alias is set.

enter image description here

  • Ah, this is the displaying issue. I guess playing into my larger issue, before when I would run the script, it would set the environment to a .sde connection, and get a list of feature classes by calling arcpy.ListfeatureClasses() . This used to just return ['WaterLines', 'WaterPoints', ...] although now, something must have happened where its returning the whole name ['dbname.fcowner.featureclass' ...] Do you happen to know why it would all of a sudden be returning the whole name? even when the alias is just set to the FC name? – branchini Jun 4 '15 at 22:19
  • 1
    @branchini I'm not sure about that. For SDE, ListFeatureClasses() has always returned the full name for me whether an alias was set or not. You might accept this answer for this question, and then make a new one for your new question. However, if you just want the last part of the feature class names, you could always just do something like: fc = [str(f.split(".")[-1]) for f in arcpy.ListFeatureClasses()] – ianbroad Jun 4 '15 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.