Select to view content in your preferred language

overwrite outputs in file geodatabase arcgis 10.1

3605
3
08-21-2013 11:10 PM
nadeemfareed
Deactivated User
hello everyone
well
i am using moderbuilder to automate some geoprocessing work. i have used arcgis tool in model builder then save the model to run, whenever it is needed. problem is
when i run the model it give me massage the output already exists. i want to overwrite the output features that are stored on database. i have enable the option in geoprocessing "overwrite the geoprecessing results" but it does not work. please let me know how i can do this that everytime when i run the model it overwrite the previous files in the geodatabase. overwriting is important so i am not ok with alternatives.

thanks alot
Tags (2)
0 Kudos
3 Replies
markdenil
Frequent Contributor
If you really want to use model builder, you will have to create a custom tool to check for the existance of the target file.
If it exists, you can delete it.
Look at "Checking for the existence of data" in the help.

It is usually easier to do processes with looping and existance checks and whatnot
entirely in python instead of mucking about with model builder.
0 Kudos
nadeemfareed
Deactivated User
i have a one python scripts which pick the data from excel file then convert into into a feature class and overwrite in file geodatabase. but i need such type of script which pick the file from current map document convert into a feature and overwrite the same feature in file geodatabase.
0 Kudos
markdenil
Frequent Contributor
Sounds like you will run into file locks,
taking a layer out of an open ArcMap document and trying to overwrite its source.

I cannot imagine why one would need to do that.... However,

You could access the mxd file with python
(not open it in ArcMap),
grab the layer,
save it to memory (or another gdb),
close the mxd (delete the mxd object variable)
and then overwrite the fc in the gdb with the in memory fc.
0 Kudos