1

using arcmap 10.3

Trying to create a 'live' draw of lines between two coordinate points. So far I have been able to easily create the lines into a new shapefile using the XY to Line tool however I would like to make this layer only display and not create and actual shapefile each time.

So each time the SQL query is pushed, the connecting lines are updated.

This question has been previously asked but I am not familiar with ModelBuilder or python (willing to learn with guidance).

1

I don't have an answer to your exact requirements, but if you don't mind having one feature that is the result of the 'XY to Line' tool, this could work. You can overwrite the result each time you run the script. It would look something like this:

# Import system modules
import arcpy
from arcpy import env

arcpy.env.workspace = "c:/workspace"
arcpy.env.overwriteOutput = True

# Set local variables
input_table = r"table.dbf"
out_lines = r"flt4421.gdb\output_line"

#XY To Line
arcpy.XYToLine_management(input_table,out_lines,
                         "LOND1","LATD1","LOND2",
                         "LATD2","GEODESIC","idnum")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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