I am doing a Select on a feature class, specifying an output gdb location, creating a Feature Layer and then creating a Layer File out of the Feature Class output. However only the layer file is created in the output folder and no feature class is created in the gdb. Does anyone have any ideas why this would be? Any help would be appreciated.
Solved! Go to Solution.
why not just add a Copy Features selections to your model as well. Selections are honoured if there are any made
Does the Select (analysis toolbox) run successfully? Can you post a screenshot of the tool parameters? Select has an output FC parameter, not output workspace.
why not just add a Copy Features selections to your model as well. Selections are honoured if there are any made
Make Feature Layer creates a layer in memory, it does not create a dataset. If you want to create a new feature class (say from a selected set), Dan is correct, Copy Features or Feature Class To Feature Class are the tools you want to use.
Thank you for all of your responses. I followed Dan's suggestion, using the copy features tool, and it works now. Prior to this, I was using the feature class to feature class tool, which I could not get to work and I still don't understand why. Thank you again for all the help, I have put a screen shot of my model below:
So, now I am having another problem, both the feature class and the layer are being created but when I preview the layer in catalog, I get the message below:
The layer is referencing the output of the select tool, which isn't created, the copy is created through the copy features tool. I tried changing the input for the make feature layer from the select output to the output of the Copy tool, but now the feature class is not being created at all and I am getting the same message from the layer. Any help would be appreciated.
I would try a couple of things since catalog has a habit of being out of the loop.
1.. if the model works and results can be added to the display, then just save the project... catalog gets notified.
2 don't use catalog unless you refresh... although, it sometimes doesn't listen... and if that doesn't work, save the project... it has not choice but to get with the plan then.
3 If neither work, go back to where it worked and report again
Thanks for the reply Dan. I ran the model again and it creates both the layer and the feature class successfully. I refreshed all file locations and restarted Catalog; however, the layer is referencing the output feature class from the Select tool, which is not created. It seems that any feature class that i want to create a layer from is in tern not created, only the layer is created. I cannot figure out how to get both without having the layer referencing a FC that does not exist.
A layer has to reference something that does exist. You basically want a featureclass which exhibits the selection (or whatever is needed). A layer file contains references to the original data plus things like symbology... Try it manually... make a layer file (*.lyr)( out of a shapefile, then physically move the shapefile to a new location and see if the *.lyr file behaves (it won't)