Robert

Your answer probably lies in your last comment

"The problem is that the second group of selections are ignored when writing
the workspace, unless they are created from the same selection clause in
MapInfo."

Presumably you would WANT them to be created from the same selection clause
or they wouldn't represent the same thing.

You have two options - 

1) Insert the selction clause from your MapBasic program into your workspace
(all a workspace is is a collection of uncompiled MapBasic statements)

2) Have your workspace run your existing MBX (insert a "Run Application
MyMBX.MBX" statement).

HTH

Paul Crisp
Syntegra

Direct:  0191 461 4522 
Mobile: 0776 414 3762
Fax: (0191) 461 1959

Innovation Place Metro Riverside Park
Delta Bank Road Gateshead Tyne & Wear NE11 9DJ


-----Original Message-----
From: Robert Crossley [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2002 12:19
To: MapInfo List
Subject: MI-L Fwd: MI: Quirks of Workspaces with selected tables


I am getting some interesting quirks when saving and opening workspaces:

I have a Mapbasic program that:
1. Selects particular farms from a table containing all farms, and gives it
a unique name (Lets call it Farm_0001)
2. Creates a map using that selection and other layers.
3. Selects some records from another table (Lets call it
SelectedLabels_0001)
4. Adds this layer(s) to the map.
5. Add the map to a layout.

The program works well, BUT

When I save the  workspace, and re-open that workspace in MapInfo, I do not
get the SelectedLabels_0001 table
in the workspace and it does not appear in the map.  The layout does not
know the reference to the map as it 
contains reference to that table and it does not exist, so it appears as an
empty frame.

There are no errors in opening the worksapce, as the workspace does not
contain the second selection clause in it, 
nor does the map refer to those layers. It does contain the first selection
statement and table though.

I tried a number of variants on it, and watched the workspace change as a
result of the changes.

If i remove the SelectedLabels_0001 from the map, and add it back again, the
workspace still does not know it exists.

If I do the same selection from the other tables using SQL in MapInfo, and
add the SelectedLabels_0001 table 
manually to the map before saving the workspace, the workspace re-opens with
SelectedLabels_0001 in the map 
(and the select statement in the workspace).  

If I change the code so that the selections are all done before the map is
created, and the map is created 
with all layers present, the program still works fine with the
SelectedLabels_0001 table open and in the map, 
but on saving the workspace, they are ignored again.

The problem is that the second group of selections are ignored when writing
the workspace, unless they are 
created from the same selection clause in MapInfo.

Any pointers on how to deal with this?


R

Robert Crossley 
Robert Crossley & Associates
9 Short St
New Brighton NSW 2483

P: 02 6680 1309
F: New Connection
M: 0419 718 642
E: [EMAIL PROTECTED]

-------- End of forwarded message --------


Robert Crossley 
Robert Crossley & Associates
9 Short St
New Brighton NSW 2483

P: 02 6680 1309
F: New Connection
M: 0419 718 642
E: [EMAIL PROTECTED]


Robert Crossley 
Robert Crossley & Associates
9 Short St
New Brighton NSW 2483

P: 02 6680 1309
F: New Connection
M: 0419 718 642
E: [EMAIL PROTECTED]

-------- End of forwarded message --------


Robert Crossley 
Robert Crossley & Associates
9 Short St
New Brighton NSW 2483

P: 02 6680 1309
F: New Connection
M: 0419 718 642
E: [EMAIL PROTECTED]




_______________________________________________________________________
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.


********************************************************************

This email may contain information which is privileged or confidential. If you are not 
the intended recipient of this email, please notify the sender immediately and delete 
it without reading, copying, storing, forwarding or disclosing its contents to any 
other person
Thank you

Check us out at http://www.syntegra.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.

Reply via email to