Purpose
Returns the path location stored in MapInfo Pro preferences for each type of table or files' dialog. This path is used to initialize the dialog path the first time that dialog is used in a MapInfo Pro session or after the path is changed in the Preferences dialog.
You can call this function from the MapBasic window in MapInfo Pro.
Syntax
GetPreferencePath$ ( preference_path_id )
preference_path_id is one of the following values:
- PREFERENCE_PATH_TABLE (0)
- PREFERENCE_PATH_WORKSPACE (1)
- PREFERENCE_PATH_MBX (2)
- PREFERENCE_PATH_IMPORT (3)
- PREFERENCE_PATH_SQLQUERY (4)
- PREFERENCE_PATH_THEMETHEMPLATE (5)
- PREFERENCE_PATH_MIQUERY (6)
- PREFERENCE_PATH_NEWGRID (7)
- PREFERENCE_PATH_CRYSTAL (8)
- PREFERENCE_PATH_GRAPHSUPPORT (9)
- PREFERENCE_PATH_SHAPEFILE (10)
- PREFERENCE_PATH_REMOTETABLE (11)
- PREFERENCE_PATH_WFSTABLE (12)
- PREFERENCE_PATH_WMSTABLE (13)
Return Value
String
Description
Given the ID of a special MapInfo Preference directory, the GetPreferencePath$() function returns the path of the directory. An example of a special MapInfo directory is the default location to which MapInfo Pro writes out new native MapInfo tables.
Example
include "mapbasic.def"
declare sub main
sub main
dim sMiPrfFile as string
sMiPrfFile = GetPreferencePath$( PREFERENCE_PATH_WORKSPACE)
Print sMiPrfFile
end sub
See Also: