I have a lot of maps (over 600) to create. They all contain the same column titles and the layouts will be the same. I don't want to have to go through and repeat the same process everytime, I would like to just have to open the file and have it map on its own. I have created a workspace to open the other tables I need for every map, but I need to know if it is possible to write a program or code with mapbasic to ask the user to specify what table to open, then using that finish the program by joining the tables and mapping. The first and last parts I can do. I just need to know how to create a dialog box to have the user select the table, or if it is even possible.
Tell me more
×
Geographic Information Systems Stack Exchange is a question and answer site for
cartographers, geographers and GIS professionals. It's 100% free, no registration required.
|
|
Yes it is indeed possible to create a dialog box to have the user select a table. Here's a link to the mapbasic 11 reference manual. Page 93 contains the information you require. |
|||
|
|
|
There are two solutions in MapBasic to let the user select the table. I wrote down the related code samples. In the first way, the user can cancel the operation. In that case mypath will be an empty string. However, in the second way, MapInfo gives you an error when the user cancel the operation. First way:
Second way:
|
|||
|
|
|
If you want to customize your dialog box you can use the .NET-platform, there is a good sample of how to make the connection at {yourMapInfoInstallationFolder}\MapInfo\MapBasic\Samples\DOTNET\HelloWorld. |
|||
|
|
