How to perform a MapBasic function that will return the name and path of the current workspace

UPDATED: October 4, 2017

There is no MapBasic function to return the name or path of a 'Current Workspace'. There is WindowInfo(<wnd>, WIN_INFO_WORKSPACE) which will return the strings that a Save Workspace operation would write to a wor file.
You can also use GetPreferencePath$() to return the default path that MapInfo Pro will use to save or read a workspace from the preference file. GetCurrentPath$() can return the preference path that is currently in use (in case it was changed from the default preference path returned from GetPreferencePath$().

You can also use SetPath statement to set the current workspace path to use and call Set Workspace Warning to turn off prompts to save workspaces by default.


Environment Details

Products affected: MapInfo Pro™, MapBasic™


  • No Downloads