One solution to printing in landscape mode without user interaction is to
rotate your map by 90 degrees, rotate any labels, then print in portrait
mode. Label rotation is slow for maps with many labels, though.

Map rotation can be performed with the following VB code. 

---------------- Rotate The Map ------------------------------
dim sAffine as String
dim sCoordSys as String
dim mapWinNum as Long
dim angleInRadians as double
dim cos as double
dim sin as double

angleInRadians = 90 * PI/180    
cos = Cos(angleInRadians)
sin = Sin(angleInRadians)

'Get the map window number, mapWinNum, here.

sAffine = "cos, -sin, 0, sin, cos, 0"

sCoordSys = "Set map Window WindowID(" & mapWinNum & ") coordSys Earth
Affine Units " + """" + "mi" + """" + sAffine
Do (sCoordSys)

Rotating the labels is just as simple:
I am assuming that each object in the layer has a label. 

------------------ Rotate The Labels ----------------------------
dim sSetMap as string
dim count as integer

'Set count here to be the number of objects in the layer.

for i = 1 to count
     sSetMap = "Set Map Layer layerNum Label Line Object " & i & " Angle 90"
     Do (sSetMap)
next i

Now print the map. To reset the map, call the same functions as above with 0
replacing 90. 

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