Model runs from within model but fails from toolbox

325
1
11-05-2011 04:48 PM
MelissaTalley
New Contributor
I have a model which was working when I set it up, but is now failing and I cannot figure out why.

The first step of the model is to copy the input dataset to a new dataset with the current time as part of the file name. When I run the model from within model builder this works fine. When I run it from the toolbox everything says that this happens, and a file is created with the correct name, but something does not work because I am unable to open the shapefile that is created and the model does not perform the functions that need to be preformed supposed to on the created shapefile.

I've worked the model down to try and figure out where it is going wrong, it appears to be as soon as I ask it to edit something on the created shapefile. If all I ask the model to do is copy the shapefile to a new shapefile I am able to open the resulting shapefile.

I'm so frustrated because everything worked fine the day I created the model and I haven't changed anything.

I'm attaching the screenshots of first running the model from the toolbox and then running it from within the model. Both time everything indicates that it worked, but it did not.

Is there some problem editing the shapfile that it causing it to no longer be opened. Or from attempting to edit it?
0 Kudos
1 Reply
MelissaTalley
New Contributor
For an update, I'm not sure I actually fixed this problem, but when I put the entire model together I did achieve the desired result which is to calculate values on selected rows, take the data from all rows and put it into a python script as a text file, output another text file from the script, make a dbf and then join the values back to this copied shapefile and kick out a new shapefile with all the data together.

I think something is still going wrong though because this only works in the desktop enviornment, once I publish it as a geoprocessing service everything says it works however when I look at the final shapefile nothing was ever calculated. Even when I remove the part where the model just selects one row and let it calculate on every row ntothing shows up as calculated in the final shapefile.
0 Kudos