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)


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
—————-
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 FunctionI took some mistake in line 10.
Need to write, of cause,
IsTableOpen = Result
(because my original function named TExist)
Pingback: MapInfo View Rememberer Version 3 « Mr Chimp Learns to Write
Pingback: Mr Chimp Learns to Write » Blog Archive » MapInfo View Rememberer Version 3