Model Builder - How to remove selected data from a shapefile?

Discussion created by russellq on Jan 9, 2013
Latest reply on Jan 9, 2013 by russellq
I am attempting to automate a process I have historically done manually using model builder.

So far I have managed to successfully convert one shapefile to points, and then iterate through multiple rasters to extract the values of those rasters to points, creating multiple shapefiles.

This is where I run into problems.

Some of those newly created shapefiles contain invalid data, with values of -9999 in a field showing the raster had no data there.  I want to remove that data.

I have tried the Analysis toolbox "Select" tool with the SQL query set to "Field Name" <> -9999, but it returns an error 000229.

I have tried "Feature Class to Feature Class" (FC2FC) with the same SQL query, and it says the geometry is invalid.  When I try and open the file outside of Model Builder using FC2FC, it says it is unusable. If I use "Add Data" to add the shapefile to my current map, and then use FC2FC, it can suddenly use the file just fine.

So my questions here are two-fold:

1) What is the proper way in Model Builder to remove selected data from a shapefile?
2) How do I create a tool in Model Builder that will run without requiring that intermediate data be added to the map?