VERIFIED SOLUTION i
X

How to change the current workspace directory in MapBasic

UPDATED: October 4, 2017


There is no method to change the workspace path using MapBasic. However, if users are opening workspaces from the File > Open dialog then they can use the GetCurrentPath$ statement to return the path to the workspace, for example:
 
include "mapbasic.def"
declare sub main

sub main
dim sMiPrfFile as string
sMiPrfFile = GetCurrentPath$( PREFERENCE_PATH_WORKSPACE)
Print sMiPrfFile 
end sub

Environment Details

Products affected: MapInfo Pro™, MapBasic™ 

Downloads

  • No Downloads