I have a point shapefile that is filled with many features. If I have 1 feature selected I need to be able to export certain fields of that selected feature (ID, lat, long) into a dbf file. What tools in model builder can accomplish this?
|
If you plan to do this repeatedly, I would suggest creating a model that would allow you to 1) pick your input layer, 2) write a query to select the features you want, and 3) define the fields you want (and rename if needed) and 4) copy the query features to a new output layer. You can do this using just 2 commands: "Make Feature Layer" and "Copy Features". Then make sure to "Make Parameters" for each of the 3 items you want to control from the model. Then you can run it just like a built-in tool with a user interface.
Above is the way the model would likely look (note the "P" for exposed parameters), and below is the UI that is automatically generated for you (no scripting or programming needed) after exposing the right parameters. Note that you can choose any input file name (layer), define a search query, check on/off the fields that you want to keep, rename fields if necessary, and define the new file name.
|
|||||||||
|
|
Feature Class to Feature Class lets you selectively include some but not all fields. |
|||||||||
|
|
The Delete Field tool will let you delete selected fields from an input layer, and the Create Table tool will export a layer to a dbf file. Both of these can be added to a model. |
|||
|
|


