Hello and good day, I recently saw a PowerPoint created by Peter Moller, titled “Using Map Basic to modify your user interface”. While being an older presentation I found it very informative. I was wondering if anyone could tell me where I could locate code that would assist me in being able to change the information for Default Directories. When working on different mapping projects I always have to go into the settings to change default directories. I would like to create a script that will allow me to change the settings with a simple click or execution of an mbx.
Mapinfo>Options>Preferences>Directory Preferences
Thank you in advance for your assistance regarding this matter.
Rob
Hi Rob
Have a look at the Set Path statement:
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)
To change the path for tables, use this statement:
Set Path PREFERENCE_PATH_TABLE "C:\Temp\"
Remember to include MapBasic.def in your source file or use the numbers in ().
And you can use this function to query the current path:
Print GetCurrentPath$(PREFERENCE_PATH_TABLE)
Note that this only changes the paths temporarily.
It doesn’t change the preferences/update the paths in the preference file.
When you close down MapInfo Pro and start it again, the paths will be reset.
Peter Horsbøll Møller
Principal Presales Consultant, Distinguished Engineer
Location Intelligence | MapInfo
M: +45 29 133 769
From: mapi...@googlegroups.com <mapi...@googlegroups.com>
On Behalf Of Rob Tozier
Sent: 7. maj 2021 19:04
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Default Directories Preferences
This message originated Externally. Use proper judgement and caution with attachments, links, or responses. |
--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en
---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mapinfo-l/7f5e1149-d739-48fc-80a1-de784d244cf2n%40googlegroups.com.