I use ArcGIS Desktop and I want create a network with a point feature and a line feature. I need my point features to be on the line features so I should do Snap point to line.

However, I do not know how do it in ArcGIS, and then automate it with code for this in VBA.

  • Did you try the Editor snapping environment? Aug 23 '10 at 16:20
  • "and then automate it with write code for this in VBA"
    – jakc
    Aug 24 '10 at 6:08
  • if points do not hold the critical information. you can also tr transform your line into points Aug 27 '13 at 15:16
  • You can refer this video to snap point features to a line feature using arcMap.. youtu.be/Lb-9ql_o4Sg Jun 9 '20 at 7:31

Snapping points to a line using ArcGIS geoprocessing tools


You have a point layer and a line layer. You want a points to be snapped to the line layer.


1. Use the Near tool to find snap locations

  1. In ArcGIS's Toolbox pane, Select Analysis Tools -> Proximity -> Near
  2. Choose your point layer as Input features, your line layer as Near features. Make sure you tick the Location checkbox.
  3. Four new attributes will be added to your point layer, NEAR_FID, NEAR_DIST, NEAR_X and NEAR_Y.

2. Export the layer as a table

  1. Open the attribute table of the point layer
  2. Click on the Table Options button in the attribute table window, and choose Export.... Save it is a dbase (.dbf) file.
  3. When prompted if you want to add the table to your current map, choose Yes.

3. Recreate the points layer from the table

  1. Find the table you just added in your Table of Contents pane. You might need to switch tabs if you are using ArcGIS 9.3 to the Source tab.
  2. Right-click on the table, and choose Add XY Data.
  3. Make sure the X field is set to NEAR_X, and the Y field to NEAR_Y. Adjust the coordinate system if appropriate.
  4. Your new point Event layer should appear in the table of contents. Right click on it, and select Data->Export data... to save the layer permanently as a shapefile.
  • Thanks for this answer. It is a clear method that I can immediately try. I am able to work with the results to get what I need.
    – cwb
    Feb 27 '12 at 19:04
  • It is worth mentioning that this solution works for users that have an ArcInfo (advanced) license.
    – Hornbydd
    Aug 8 '13 at 17:40

ArcGIS 9.3.x:

In the ArcGIS interface, use the snapping environment within the Editing toolbar.

Programmatically, you can find a number of snapping-based Visual Basic examples at the ESRI resources page (note: personally, I like to use the old page. I think it's easier to find stuff. VB resources). See for instance, VB code to "bulk snap": "The Bulk Snap command will take selected features and attempt to snap them based on the current settings of the Editor snap environment."

ArcGIS 10:


You can do it with Hawths Analysis Tool. You can download it here.

I found it here for ArcGis 9.3 but I warn you that I did not test it. If you have time you can try it.

  • I have it,but it can not work with ArcGIS 9.3.
    – Nima
    Aug 23 '10 at 6:42
  • I deleted your second answer and merged it into this one.
    – fmark
    Aug 24 '10 at 2:29

Assumption you have the Network Analysis Extension for ArcGIS (9.3) Sp3: Your 'Network'

Creating a Network >Arcatalog (you must understand the TYPE of network you are trying to build first!) http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Creating_a_network_dataset

You can automate this with ModelBuilder (Python)


{linear unit}
The search tolerance for locating the input features on the network. The parameter includes a value and units for the tolerance.

{source {snap type};source {snap type}...} point and line Allows you to specify which sources in your network dataset will be searched when finding locations, as well as specifying what portions of geometry will be used.


There are plenty of tools available on Arcscripts. See this search

I cannot vouch for it, but Snap and split program looks like it fits your requirements?

Let me know if you have problems "installing" it or using it.

Your Answer

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