Purpose
Rotate a text object; corresponds to choosing Spatial > Edit > Transform > Rotate Text. This function requires the MapCAD Tool and can be executed via the Exec() command. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
Exec ("MapCAD.mbx","RotateText", OldObj, Angle, Method)
Return Value
Text Object If the function failed the return object is a Point (0,0).
Description
Use the RotateText function to rotate a text object by giving a rotation angle and a method.
Parameters | Description |
---|---|
OldObj |
Object value, Text
|
Angle | Float value. A positive angle rotates counterclockwise, a negative angle rotates clockwise. |
Method |
Integer value. 1 = Additive; The given rotation angle is added to the current rotation angle of the text object. 2 = Absolutely; The current rotation angle of the text object is replaced by the given rotation angle. |
Examples
'Rotate a selected text object.
Dim NewObj as object
fetch first from selection 'must be a text object
NewObj = Exec("MapCAD.mbx","RotateText", selection.obj, 45, 1)
update selection set obj = NewObj where rowid=1