Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to append a feature class from a file geodatabase to an Arcsde featureclass using this line of code:

arcpy.Append_management("parcel_copy", sde_path+"parcel" ,"NO_TEST")

This line works under Python console in ArcMap , but when I execute it under Pyscripter IDE, all the code works fine except the append statement, and it does not return an error.


Thanks for you responses, i have tried to isolate the append statements in a little script, and it worked, but i steel don't understand why it has not worked.

i wonder if i have not deleted a featurelayer refering to a featureclass in SDE, that locks this featureclass, so i cannot append to it.

any explanation is welcome

share|improve this question
    
Consider using os.path.join to join the path and table name in a more robust way. –  blah238 Oct 4 '12 at 3:28
    
the feature classe "parcel_copy"is in the geodatabbase set in the workspace of arcpy, so i can access to this feature class. –  geogeek Oct 4 '12 at 7:26
add comment

1 Answer 1

up vote 3 down vote accepted

"parcel_copy" appears to be a layer in the Table of Contents of your map, so will be found when you run the script from ArcMap.

However, in order to let the script (when run outside of ArcMap) know where the data that layer is based on can be found, you will need to either issue MakeFeatureLayer before the Append, or more simply reference the path to the dataset in place of the layer name of the Append.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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