Steven Heapy wrote:

> My problem is could anyone tell me how to find all the text
> within this
> table with those (270 to 280 degree) rotations ... and how to
> rotate
> them to say 270 degrees.

You will first need to set the default text style (menu:
Option/Text Style) to the font size and style you want the result
to be. (click on an exisiting text string and make the default
match that)

Then if your table is called "Untitled" this will do the trick.
(put your map window on top, type these lines into the MapBasic
window, highlight them all, and press 'Enter'):

Select * from Untitled where Str$(obj) = "Text" into TMP
Select * from TMP where ObjectGeography (obj, 7) >= 270
     and ObjectGeography (obj, 7) <= 280 into TMP1
update TMP1 set obj=CreateText (FrontWindow(),
     ObjectGeography(obj, 5), ObjectGeography(obj, 6),
     ObjectInfo(obj,3), 270, 0, 0)

This first selects all objects that are text and puts them in
TMP. Then it selects all those from TMP that fall into the
required angle range and dumps them in TMP1. Then it updates the
objects using their current settings (x, y, text string), and the
default text style, and a fixed angle of 270, centered over the
anchor point, with no offset. To make the changes permanent,
you'll have to save the table manually (menu: File/Save Table).

It shifts the strings a bit, but you might try fooling around
with the anchor setting and offset (the anchor range is 0-8
inclusive, offset is in points). These are the last two
parameters in the CreateText() function, and they correspond to
the "position" control group on the MapInfo "Label Options"
dialog box (menu: Map/Layer Control/Label).

Good luck!
- Bill Thoen

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