1. Changing the projection on existing files and afterwards delete and
renaming.... I guess it would be easier for you if you
start by renaming the original table to eg. <origname>_ORIG. This can be
done from within MapInfo. Afterwards you can make a copy
of this table using the way you specify File > Save Copy as... and here use
the original table name.
An easier way would be to use the MapBasic window in this way:
- Open a number of tables, that should have changed the projection
- Open the MapBasic window
- Now do the routine to rename, save as and so on
- Note that the MapBasic window contains the code for these commands
- Close the table copied
- Now we have to alter the commands in the MapBasic window
- Start by writing these lines at the top each followed by a Return/Enter
Dim szTab As String
Dim szFile As String
Dim szPath As String
These variables will be used for holding the table name, the file name and
path of the current table.
- Now enter these lines below the two lines above into the MapBasic window,
again followed by a Return/Enter
szTab = TableInfo(1,1)
szFile = TableInfo(1,19)
szPath = PathToDirectory$(szFile)
These lines captures the table and file name of the first availeble table
- Now we only need to change the lines allready shown:
Rename Table szTab As szPath + szTab + "_ORIG.TAB"
Commit Table szTab + "_ORIG" As szFile CoordSys <here is the
parameters for the new projection>
Close Table szTab + "_ORIG"
To make this "Run in batch mode" you'll have to do this:
Select/Mark the last 6 lines in the MapBasic window, hit Enter/return.
For every time you hit Enter/Return another table has been saved as. Make
sure that all these 6 lines are highlighted when you hit Enter.
It now sure that the lines stay highlighted the first few times, but after
this they should stay highlighted and it's easy to copy the tables.
Please note that this macro is working on the tables open.
Please note as well that the first 3 lines (Dim ...) should only be run
once.
If you are sure what you are doing, you could delete the original table
instead of closing it, but ...
2. Workspaces hold information on projection as well as tables, so when you
open one of your workspaces you will be presented with the
old projection. Here you'll need to change the projection in each mapper.
I hope this helps,
Peter
------------------------------------------------------------------------------------------------
Peter Horsb�ll M�ller, GIS Udviklingskonsulent / GIS-Developer
Kampsax A/S - GIS Software & Solutions
Rugaardsvej 55, 5000 Odense, DK
tel: +45 6313 5013, dir:+45 6313 5008, fax: +45 6313 5090
mailto:[EMAIL PROTECTED]
www.kampsax-gis.dk and www.kampsax.dk
Authorized MapInfo Partner & Distributor in Denmark and Norway.
------------------------------------------------------------------------------------------------
Klik ind p� http://www.kortal.dk og se det hele lidt fra oven!
----- Videresendt af Peter M�ller/Kampsax - 05-03-2002 07:25 -----
"Tim Ellis"
<[EMAIL PROTECTED]> Til:
[EMAIL PROTECTED]
Sendt af: cc:
[EMAIL PROTECTED] Vedr.: MI-L Changing
Projections and Workspaces
onsmag.com
05-03-2002 06:13
Besvar venligst til "Tim
Ellis"
MapInfo Users,
I am currently in the process of changing the projections of the maps which
I have made from Longitude / Latitude to AMG 94 (Zone 55). Once I open the
.tab file, I click 'save copy as' and change the name (as it won't allow me
to save using the exact name of the open .tab file). I have various
workspaces saved and want to preserve these.
My question is, if I convert all my .tab files to another projection and
thus change the name, will it affect my workspaces???
Is there a way around it without having to delete the original file and
renaming the new file to the existing file name?
Thanking you in advance.
Cheers,
Tim
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.