[GIS] How to create a polyline in MapInfo Pro by using the snap to nodes function

linemapinfonodessnapping

I want to create a polyline in MapInfo Pro by using the snap to nodes function, which I can do.

But what I am interested to know is that when a node is added to the polyline, could any of the underlying data attributes/fields of the node that was snapped to (eg ID) be captured into the new Mapinfo table that is being created?

Best Answer

There is no in-built way of doing this AFAIK, however you could use MapBasic to develop a custom drawing tool that would provide this functionality.

It should be noted that this would not be a foolproof method of picking up the actual snapped-to node in the case of having multiple selectable background layers. Unfortunately there is no functionality to return the snapped-to layer or object, you would have to search the locality (within a small tolerance) of the click location for any underlying objects. Where multiple objects are returned you would have to find a way to identifying which one you wanted to use for the attribute information.

If you do want to do this, a good start would be to look up ToolButton, CommandInfo, SearchPoint and SearchInfo in the MapBasic User Guide.

Related Question