How get and set directory for MapInfo tables?

34 views
Skip to first unread message

Evgeny Kleiman

unread,
Oct 20, 2021, 2:21:43 AM10/20/21
to MapInfo-L
Hello,
I have the following problem. In my MBX-application an user firstly opens a dialog where he/she selects a directory and opens some table in the directory. All the following work takes place in this directory so for all operations only name of a table is used. For example:
 Open Table "Restrictions"  (1)
or
Commit Table "Restrictions" (2)
But sometimes an user wants to open a table from other directory using MapInfo, not  MBX-application  . After that when user returns to operations with MBX-application it seems that current directory is changed so the operation like (1) or (2) work wrong.
So my question: how can I check and/or change the current directory for work with tables? Is it possible to not change the selected directory of the application when user open tables in MapInfo?
Thank you

Peter Horsbøll Møller

unread,
Oct 22, 2021, 4:33:15 AM10/22/21
to mapi...@googlegroups.com
I’d always recommend using a precise reference when opening a table, that is path and file name.

You could grab the path from one of the opened tables and use this in your code.

Peter Horsbøll Møller
Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 


Den 20. okt. 2021 kl. 08.21 skrev Evgeny Kleiman <evgeny...@gmail.com>:



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/b4ae482a-d42e-47c3-b9dd-c02814d800e6n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages