Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

up vote 6 down vote accepted

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.

alt text

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.

alt text

share|improve this answer
1  
You sir are awesome, thank you for this and here is your internet high five! high five –  Furlong Jan 10 '11 at 23:51
2  
After re-reading the post, I realize I forgot about the "export to DBF". As Zachary pointed out, simply replace "Create Features" in my model with "Copy Rows" and you can export directly to DBF. Or if you want both features and a standalone DBF, you can link both a Copy Rows and a Copy Features command from the "Output Layer" in the model. –  RyanDalton Jan 11 '11 at 16:56
    
How can I change it so it does not add the table in the "list by source" window? It takes forever to load so if I stopped it from adding it in that window it will cut down the time it takes for this model to process greatly. –  Furlong Jan 17 '11 at 16:14
add comment

Feature Class to Feature Class lets you selectively include some but not all fields.

share|improve this answer
    
Yes, an excellent solution. You would then just export the attribute table to a dbf from ArcMap. –  celticflute Jan 10 '11 at 18:08
    
How can I specify which feature in the shapefile to run this on? –  Furlong Jan 10 '11 at 21:40
1  
All GP tools should only ever act on the selection set of a layer. –  Jason Scheirer Jan 10 '11 at 21:46
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.