Today we will take a closer look at working with workspaces in MapInfo Pro.
A workspace could also be called a MapInfo Pro project file. It's a way to store details of your current session that you are working on inside MapInfo Pro.
A workspace captures necessary details to be able to restore your project at a later time when you need to revisit your project.
A workspace file is a text file starting with 3 dedicated lines that tell MapInfo Pro that it's opening a workspace file. This file holds several lines with MapBasic commands to recreate your project.
A workspace file holds information about:
What tables to open
What queries to run
What maps to create with which tables
How to configure the individual layers with override styles, labels, and themes
What layout windows to create, and what maps, text, and other elements to add to these.
and probably a few things I have overlooked.
As it is a plain text file, you can open the file in a text editor, and - if you know what you are doing - modify the MapBasic statements to make the workspace behave differently. I have discussed this in a previous article where we added Print statements to a workspace to understand where it was slow. I also recommend creating a backup of the file before modifying it.
You can open a workspace via Open Workspace from the Open dropdown on the Home tab. You can also find this control on a couple of other tabs. If you like to use keyboard shortcuts, use Ctrl+Shit+O.
When the workspace has been loaded, you will often see tables appear in the Explorer window and windows being created too. All this does of course depend on the content of your specific workspace.
You can now in the title bar for MapInfo Pro see the name of the workspace you just opened. Notice that a small Asterisk (*) will appear next to the name if the workspace has unsaved changes.
Similarly, the name will appear in the statusbar, in the right corner. Here you also find a small popup that gives you access to three useful shortcuts for your workspace. You can save the workspace, copy the path to the workspace file, and open Windows Explorer with the folder containing your workspace.
With the switch from 32-bit to 64-bit MapInfo Pro, we also introduced the concept of the current workspace.
The basically means that when you open a workspace, this becomes the current workspace. This comes with some benefits.
It is now possible to save your workspace just by using the Save Workspace control. Back in the 32-bit days, you would have to specify where you wanted to save the workspace and accept that you were overwriting an existing file.
Now, you can click on Save workspace and the changes will be saved. No questions asked. You can even use Ctrl+Shift+S for easy access.
The use of a workspace has become more consistent with the use of other files as we now remember what workspace you are using.
You can still save your existing workspace into a new workspace. You can use Save Workspace As from the Save Workspace dropdown on the Home tab. This makes it similar to saving a copy of a table.
Another thing that has changed radically from how it worked back in 32-bit is how you open a workspace when you already have a workspace open. Back in the day, you use Open Workspace no matter if you already had a workspace open.
Now you need to use Add Workspace if you want to add/insert another workspace into your current workspace. This allows you to keep you current workspace and open another workspace.
If you use Open Workspace while already having a workspace open, MapInfo Pro assumes that you want to replace the current workspace with another. MapInfo Pro, therefore, closes the current workspace before opening the new one.
Workspaces now have their own preferences on the Backstage.
You can turn on autosave for your workspace to be saved every x minutes and you can have a backup created of your previous workspace file before overwriting it.
You can enable a warning to save your workspace in certain conditions, and lately, we added an option to save the workspace locally and then copy it to a mapped network drive. The last enhancement was made as we saw a number of customers having issues with corrupted workspaces when saving these directly to a mapped network drive.
I hope you have found it useful. Feel free to post any questions related to workspaces.
I know this is an older article but as still a relative newbie I'm playing catchup on a lot of things.
Am I correct that there is no option to start a completely new workspace other than start a new session of MapInfo?
That is like say MS Word, there is no File New option?
I hope the #MapInfoMonday posts stay relevant for a long time so don't hesitate to post questions to even the older ones. IN fact, this goes for many of the posts on the community.
MapInfo Pro does have the option to create a new workspace but that doesn't mean you can't do that. a Word file might be better compared to a table in MapInfo Pro.
Anyway, here are some tips on creating a new workspace:
Have workspaces changes recently? I am sure when I used to save a workspace, it would open up with the same window tab at the front as when I left it, and with the tabs in the same order as when I left them. Using v2023 Build 119.A bit of experimentation today showed me that it always opens a browser at the front, and if I left it with a map window as the far left tab, that tab is moved to the far right when I re-open the workspace.I am sure this hasn't happened previously, but am I mistaken?
Workspace as saved:
workspace on re-opening:
It's driving me mad, as the browsers are only open incidentally, and I don't need to see them much. I know I could close them, but that's not the point.