I am using ArcGIS 10.1 desktop on Windows 7 and I want to run few task automatically.

Scenario: I have plane table from sql server contains lat,lon information. I have added that table in ArcMap and displaying x,y points by right clicking on that table and generating x,y layer that work fine for me.

Now when DBA inserts few records to that table the table is auto updating but not those points (I need to right click on that table and generating x,y layer)

I want to make this process automatic (through scheduler in windows 7 & I thought that ModelBuilder would be the best way for this and creating the ModelBuilder and referring this link

Is this a correct way or is there any alternate way available for this?

  • 1
    The event layer should update when you refresh the map. Are you testing this interactively through ArcMap?
    – PolyGeo
    May 9, 2013 at 7:48
  • @PolyGeo Yes I am testing through ArcMap
    – Sunil
    May 9, 2013 at 7:51

2 Answers 2


I'm going to propose that you retest your original procedure being careful to follow the steps as described below. Although I cannot test them, they gel with my understanding of event layers, and come from an ArcGIS Discussion Forum posting whose author appears to have used them successfully.

1.Have a connection in ArcCatalog ready to your SQL DB

2.Start with an empty MXD.

3.open toolbox - data management - layers and tables - make query tables

4.click on yellow folder - find your connection, then find your table, select it - ok

5.key field options - change to "add virtual key field" - this gives your items an ID

6.click ok

If you did everything right, it should complete and place a table in the TOC in ArcMap.

1.Now, right click on the table.

2.Select "display x,y events"

3.assign your x and y fields and choose a coordinate system

4.click ok

The points will now display in the map. If the data changes in the SQL database, the points will change as well, every time you refresh or open this map.


I had done something similar. We had created a model in ArcGIS desktop. We then wrote a python script to call the Model and run it as an ArcGIS Geoprocessing tool. Using Windows task Scheduler, we ran the python tool every 4 hours. That was basically a few hours work.

In your situation, you have the X & Y values in different columns in a given table. If you have ArcGIS 10, you could use a Query Layer. Your SQL query could convert the non-spatial table into a Spatial View by using the Point Construction function in it. That way, any inserts in the table will be automatically shown.

DO Note that this might not give good performance for large tables, since there will be no Spatial index.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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