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.

When I run the following code with the outFC creation path set to a feature dataset inside a file geodatabase...

arcpy.XYToLine_management(tempFC, outFC, "POINT_X", "POINT_Y", "NEAR_X", "NEAR_Y",
"GEODESIC", "", formatSpatialRef)

...I get the following message:

ERROR 000582: Error occurred during execution.

The script runs without errors when I set the outFC creation path to the root level of the gdb. Spatial references for the feature dataset and the output FC are identical. I'm wondering if this is a case of a built-in behavior similar to what is described in this posting:

http://forums.arcgis.com/threads/39448-Using-Python-can-t-get-Batch-Project-outputs-to-save-in-a-feature-dataset

share|improve this question
    
As a work around, after XYtoLine finishes you can copy the FC to the Feature Data set, then delete the root level FC. –  klewis Oct 21 '11 at 15:56
    
Very true, and very easy. My question has more to do with what the underlying cause is. 000582 is an extremely general error, and the realization that it was linked to creation inside a feature dataset only came after a lot of time and hair-pulling. If this is a behavior that is linked to spatial references, it would be nice to verify and start a list of the commands it affects. –  spaztec Oct 21 '11 at 16:53
    
I believe it is the same issue and makes sense if you think about it from ESRI's perspective. –  Jamie Oct 21 '11 at 18:05

1 Answer 1

I just submitted an ArcGIS Idea to:

Ensure all relevant tools can write to feature datasets direct

There are a number of tools that will enable their output to be written to a file geodatabase feature class and then copied to a feature dataset, but will not allow writing direct to that feature dataset.

Would it be possible to have all such tools enhanced to enable this, please?

An example is the XY To Line tool encountered at No placement inside feature dataset using arcpy XYtoLine?

share|improve this answer

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.