Using ArcGIS Desktop 10.5.1, I have a FGDB that contains a feature dataset. I would like the output from the "Split By Attributes" tool to go inside this feature dataset. However, the tool does not show the existing feature dataset as an available target workspace, as shown here:
How do I send the output feature classes to a feature dataset?
2 Answers 2
It appears that the Split By Attributes tool does not currently support creating its output feature classes in a Feature Dataset.
One way to workaround that software limit would be to use an ArcPy answer to Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop? as starting code to develop one.
Another is the suggestion in a comment by @MichaelStimson:
try running the tool from the python console and just see if it has an issue with using a feature dataset as a parameter for Target_Workspace when being run without the dialog (which would prove it's the dialog that's bad and not the tool)
Alternatively, you could post an ArcGIS Idea to have the tool support a Feature Dataset as the Target Workspace.
-
2It appears to be an oversight in the tool dialog; I can't find it in 10.2 so it must be fairly new.. two options: Export to a gdb without a feature dataset then import into your feature dataset or try running the tool from the python console and just see if it has an issue with using a feature dataset as a parameter for Target_Workspace when being run without the dialog (which would prove it's the dialog that's bad and not the tool). I'd try the command line first and if that still has a problem then the two-step process.Michael Stimson– Michael Stimson2018年12月18日 23:18:00 +00:00Commented Dec 18, 2018 at 23:18
-
2@MichaelStimson it came in version 10.5.Hornbydd– Hornbydd2018年12月18日 23:38:40 +00:00Commented Dec 18, 2018 at 23:38
-
Ah @Hornbydd that would explain why I have written a script that does essentially the same thing, I prefer not to re-invent the wheel (unless the wheel is indeed broken). I'm still stuck on 10.2 because of ArcGIS (ArcMap) handling of versioning during an edit session.Michael Stimson– Michael Stimson2018年12月18日 23:41:40 +00:00Commented Dec 18, 2018 at 23:41
-
1@MichaelStimson Your command line suggestion works, so as you suggest, it appears to be a tool dialog oversight. Hello, ESRI???Stu Smith– Stu Smith2018年12月18日 23:58:38 +00:00Commented Dec 18, 2018 at 23:58
-
1@StuSmith see the answer I provided which expands on MichaelStimson's idea as a way to get the tool to a state you want.KHibma– KHibma2018年12月19日 19:31:41 +00:00Commented Dec 19, 2018 at 19:31
The provided/accepted answer explains the behavior. This answer provides a possible workaround.
As Split by Attributes is a Script tool, you can hack it a little bit. (I don't have 10.5 to test if this change will 'just work', but I know the hack will get you the behavior you want: to set the output in the tool to a feature dataset).
- With ArcToolbox or the Catalog Window toolbox, find Split by Attributes, right click and Copy
- Create a new toolbox in your working directory, right click and Paste the tool in.
- Right click the copied tool and select Properties
- Select the Target Workspace. The Data Type will be set to Workspace. In the drop down change this to Workspace or Feature Dataset
- Click ok to save changes and run the tool
If the tool doesn't "work", that means the code inside doesn't allow the writing of output to the feature dataset. Thus you could ping Esri to enhance the tool. If it does work you could still ping Esri and call the problem a bug (oversight that the wrong data type was selected in the tool design).
-
Hot Damn, it worked! The output now goes to a feature dataset. You, Sir, have mad skills! ESRI desperately needs to hire you...Stu Smith– Stu Smith2018年12月19日 21:23:33 +00:00Commented Dec 19, 2018 at 21:23
-
@StuSmith Open his profile for a pleasant surprise! Note received and will be looked into, cheersscw– scw2018年12月20日 02:19:18 +00:00Commented Dec 20, 2018 at 2:19
-
@scw I may have already pinged a certain maple syrup loving member of the GP team about it. ;)KHibma– KHibma2018年12月20日 02:53:45 +00:00Commented Dec 20, 2018 at 2:53
-
@scw Indeed, that is a pleasant surprise. Do I see a Far North Employee of the Day Award in the offing? Now, what about those orphan file locks?Stu Smith– Stu Smith2018年12月20日 06:51:56 +00:00Commented Dec 20, 2018 at 6:51
Explore related questions
See similar questions with these tags.