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:


  • 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

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?

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.