1

I'm trying to add an MS Access table as a layer in ArcMap 10.6. There are four columns with coordinates - from_x, from_y, to_x and to_y. I want to represent the records as lines on the map.

I can add the table, but when I choose "Display XY Data..." I get no option to display data as anything but points:

Display XY Data dialog

Is there a way to display lines? For compatibility with other software, I need to keep the data in an Access database, so keeping everything in a geodatabase is not an option.

In the ideal scenario, data should automatically be up to date as in the Access table every time I open my workspace. If that is not possible, some kind of import step where you by simple user action reimport the data could also work.

2

You are using the wrong tool, what you are showing is converting XY to points. You need to be using the XY to Line tool. This will create straight lines between your pair of coordinates.

  • Thanks for the answer! The XY to Line tool does not seem to be "live", instead it creates a copy of the data. That is quite inconvenient, since it requires users to rerun the tool every time they open the workspace to get updated data. Is there no way to make a live connection for line in the same way as for points? – Anders Oct 11 at 9:54
  • Short answer is no, I know of no way to create a line event from pairs of XY from "live" data. Probably the nearest to that is generating graphics (so not a feature layer) but that would require custom code. – Hornbydd Oct 11 at 10:07
  • Just an idea but you could run that tool and make sure the output goes to in_memory, a temporary "in memory workspace"? When Arcmap closes the data is destroyed and no permanent dataset hangs around? – Hornbydd Oct 11 at 10:09
  • Sounds promising. I'll try it out. Thanks! – Anders Oct 11 at 11:34

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.