When I try to convert labels to text objects (using the mapbasic function 
LabelInfo(window_id, layer_nr, LABEL_INFO_OBJECT)) I never get all of the 
labels converted and sometimes my program crashes with the message that 
there is no current label.
Also I have trouble with scaling rotated text objects.

At first I tried it by:
*       setting the map to the right scale
*       converting the objects on the screen layer by layer
*       panning the map
*       converting the objects on the screen layer by layer
*       panning the map
*       etc.
As result I got about 10% of the labels spreaded throughout the map. Those 
labels apeared however about 600 times in my text object table.
Aparently, when MapInfo tries to find a labels on the screen while there is 
none, he finds a label outside the screen.

Then I let my program check for every label he found if its anchor point 
was within the screen (if so: convert label; else do nothing). As the 
result I got still about 10% of the labels converted, but this time only 
once.
Has anyone got any idea why MapInfo didn't find all of the labels. (I'm 
sure I let my program search the whole map.)

Then I used a different approach:
*       I let my program scale the map to fit on the screen
*       then I  let my program convert the labels layer by layer
*       then I  let my program scale the objects to the right size by changing 
MBR coordinates (MBR = Minimal Boudery Rectangle)
The result:
Lots of labels were converted, but not all of them. Every time I run my 
program a different amount of labels is converted (depends on the mood of 
my computer, I suppose). Sometimes I get hundreds of text objects, 
sometimes thousands (there are about 4000 labels in my map).

The horizontal texts were scaled back correctly, but the rotated texts 
remained much to big. The MBR's however were always scaled correctly. Does 
anyone happen to know what goes wrong here?

There is still another problem:
Sometimes my program crashes at a LabelInfo() function with the message 
that there is no current label. However my program should only execute the 
LabelInfo() function if he has found (and selected) a label.
If this happens my program already has succesfully converted some labels 
(sometimes tens, sometimes hundreds, sometimes thousands) and sometimes it 
doesn't happen at all.

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to