Set Path statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Allows user to change programmatically the path of a special MapInfo Pro directory defined initially in the Preferences dialog to access specific MapInfo files. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Set Path current_path_id path

current_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_REMOTETABLE (10)
	PREFERENCE_PATH_SHAPEFILE (11)
	PREFERENCE_PATH_WFSTABLE (12)
	PREFERENCE_PATH_WMSTABLE (13)

path is a string value, indicating the directory or folder to be used for these files.

Description

Set Path statement given the ID of a special MapInfo Preference directory allows to set it programmatically. 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
Set Path PREFERENCE_PATH_WORKSPACE "C:\Temp\"
Print GetCurrentPath$(PREFERENCE_PATH_WORKSPACE)
end sub

See Also:

GetPreferencePath$() function