I have a model I built in ArcMap. I exported it to a python script and made some changes. Can I import this python script back into model builder?
Jake,
When I add the script to the model and run it, it gives the following error.. What I don't understand is that when I run the model before exporting it to the python script it does not hang on the LocateFeaturesAlongRoute. Is there a different syntax in python for this? The input is a line and a table and the output is a point.. Here is the error I get.. Its not even getting to the code that I made changes to..
My first try I created a Python toolbox and received the same error message..
Try adding the following line to your python script. You will to add this after the 'import arcpy' line.
arcpy.env.overwriteOutput = 1
This will allow the script to overwrite output if it already exists.
overwriteoutput doesn't work in a number of hard to nail down cases, but your error says that the first point already exists and it appears to be of the wrong type(?). You might try it after a manual delete and restart of arcmap to see if that is the problem. If it is remnant data you may have to use Delete_management to delete stuff that already exists
In my experience, the most common situation where overwrite output does not work is if you have an active layer in memory (say in ArcMap) pointing to a dataset that you are trying to overwrite with your script - and the layer is not a parameter, so the script doesn't "know about" the layer well enough to zap the file lock.
My guess is when you are running in ModelBuilder your model elements are pointing to ArcMap layers so the delete works.
seems to clear memory now but still get this error..
The type of out_event_properties does not match the type of in_features.