There's more to experience when you log in!
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.