Tuesday, 24 January 2017

arcpy - How does one access a featurelayer in SDE via Python?


I am trying to use Arcpy to run the CopyFeatures_management script so that I can copy a featurelayer in SDE.


What do I use for the input (and output, for that matter, since I'll be copying the layer back to SDE) to access the layer?



Answer



You'll use the path to the SDE file plus the feature class name, so something like


CopyFeatures_management(r'c:\connections\my.sde\fc1', r'c:\connections\my.sde\newfc')


No comments:

Post a Comment