MapInfo Viewport Tool

Update: Version 3 of this tool is now available. See this post.

Here’s a simple but very useful app I’ve made for MapInfo. It stores map views in a table which is attached to the workspace. You can then go straight back to that view rather than scrolling for hours trying to find out where you were!

It’s similar to the “NamedViews” app which comes with MapInfo but saves the views to a table on a per-workspace basis rather than saving a set that is unique to the MapInfo installation.

NOTE: This app isn’t entirely accurate. (See discussion here) When going back to a saved view it will centre on the right coordinates but the scale will be slightly off. This is annoying but it’s still a lot quicker than doing it the manual way. If you know a way around this, please get in touch!

Screenshots

(source code removed)

Advertisements

About Mr Chimp

I make music, draw pictures, browse the internet, programme, and make sweet, sweet cups of tea until the early hours.
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

5 Responses to MapInfo Viewport Tool

  1. Yuriy says:

    Interesting…

    I wrote another version of IsTableOpen.
    I think it’s shorter by code lines and faster for execution.
    ————————-
    Function IsTableOpen(Byval TName as string) as logical ‘ Function for checking if a table is open
    Dim i As Integer
    Dim result As Logical

    OnError Goto Err_trap
    Result = FALSE
    i = TableInfo(TName,TAB_INFO_NCOLS)
    Result = TRUE
    exit_func:
    TExist = Result
    Exit Function
    Err_trap:
    Resume exit_func
    End Function
    —————-

    • Mr Chimp says:

      Ah, that’s a clever way of doing things. Thanks for that.

      I wonder if you can put formatted source code in the comments…

      Function IsTableOpen(Byval TName as string) as logical ‘ Function for checking if a table is open
          Dim i As Integer
          Dim result As Logical
      
      OnError Goto Err_trap
          Result = FALSE
          i = TableInfo(TName,TAB_INFO_NCOLS)
          Result = TRUE
      exit_func:
          TExist = Result
          Exit Function
      Err_trap:
          Resume exit_func
          End Function
      
      • Yuriy says:

        I took some mistake in line 10.
        Need to write, of cause,
        IsTableOpen = Result

        (because my original function named TExist)

  2. Pingback: MapInfo View Rememberer Version 3 « Mr Chimp Learns to Write

  3. Pingback: Mr Chimp Learns to Write » Blog Archive » MapInfo View Rememberer Version 3

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s