XY to Line with Model Builder

2367
6
09-13-2013 07:22 AM
JayPhiloon1
New Contributor II
When I attempt to tie the output of "XY to Line" to the next step, "Add Field", model builder simply stops after "XY to Line", thinking it's all done. It does not execute subsequent steps.  Is there something wrong with doing this?  It seems to work manually...

[ATTACH=CONFIG]27438[/ATTACH]

This is excerpted from a larger flow.  Two methods of geocoding produce two sets of X,Y points which I make into lines, then get the distance in miles for visualization and comparison purposes.
0 Kudos
6 Replies
TimWitt
Frequent Contributor
Can you post a picture of your model?
0 Kudos
JayPhiloon1
New Contributor II
Original post edited to show model.
0 Kudos
TimWitt
Frequent Contributor
Can you run the model and then go to Geoprocessing -> Results and see if there was any error in your model?

You could also export your model and run it in python and see what error pops up there.
0 Kudos
JayPhiloon1
New Contributor II
Interactive I get:
Result Messages:
Executing: XYToLine \\somehost\GIS\geocode_test.gdb\Geocoding_Result_Model \\somehost\GIS\geocode_test.gdb\Geocoding_Result_Model_XYT LONGITUDE LATITUDE POINT_X POINT_Y GEODESIC scrssn_char "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1111948722.22222;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision"
Start Time: Fri Sep 13 13:02:03 2013
Succeeded at Fri Sep 13 13:02:04 2013 (Elapsed Time: 1.00 seconds)

In Model Builder I get:
Executing (XY To Line): XYToLine \\somehost\GIS\geocode_test.gdb\Geocoding_Result_Model \\somehost\GIS\geocode_test.gdb\Geocoding_Result_Model_XYT LONGITUDE LATITUDE POINT_X POINT_Y GEODESIC scrssn_char "GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1111948722.22222;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision"
Start Time: Fri Sep 13 12:29:21 2013
Succeeded at Fri Sep 13 12:29:22 2013 (Elapsed Time: 1.00 seconds)

In python26 I get:
... setup ...
>>> # Process: XY To Line
... arcpy.XYToLine_management(Geocoding_Result_Model, Geocoding_Result_Model_XYT
, "LONGITUDE", "LATITUDE", "POINT_X", "POINT_Y", "GEODESIC", "scrssn_char", "GEO
GCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.25722356
3]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1111948
722.22222;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPre
cision")
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "D:\Program Files (x86)\ArcGIS\Desktop10.0\arcpy\arcpy\management.py", li
ne 2542, in XYToLine
    raise e
arcgisscripting.ExecuteError: ERROR 000582: Error occurred during execution.

... rest of script...

However, it looks like the command executed fine, and the python script continues to execute "Add Field" and "Calculate Field", as it should, with valid results.  (I have obfuscated the real path to the host in the text.)

So what's the error being reported here?  Looks like an error that's not an error...
0 Kudos
TimWitt
Frequent Contributor
Does this feature "Geocoding_Result_Model_XYT " already exist when you run your model or do you delete it each time before you run the model?

If you don't, try and delete all features that will be created through your model and then run it in python again to see if you get an error.
0 Kudos
JayPhiloon1
New Contributor II
For these tests I manually delete "Geocoding_Result_Model_XYT"  before running.  It definitely isn't there to start.

I should also note that in the results for Model Builder above I am trying to run the entire model but it terminates after XYToLine.
0 Kudos