Controlling Snap Tolerance - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

You can set snap to a particular pixel tolerance for a given window, set snap back to the default snap tolerance for a given window, or retrieve the current snap tolerance for a given window. You can also turn snap on/off for a given window, or retrieve information about whether snap is on/off for a window.

Snap mode settings for a particular window can be queried using new attribute parameters in the WindowInfo( ) function. Snap mode and tolerance can be set for each Map and Layout window. These settings are saved in the workspace for each window.

Example

Dim win_id As Integer
Open Table "world" 
Map From world
win_id = FrontWindow( ) 
Set Window win_id Width 5 Height 3