ESRI.ArcGIS.ADF.IMS
LayoutInfo Class
Members  Example  See Also 
ESRI.ArcGIS.ADF.IMS.Carto Namespace : LayoutInfo Class




Provides some information about the layout in an ArcMap Server image service.

Object Model


Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class LayoutInfo 
Visual Basic (Usage)Copy Code
Dim instance As LayoutInfo
C# 
[SerializableAttribute()]
public class LayoutInfo 

Example

The following example obtains the LayoutInfo from an existing MapService object, and prints the layout size and units to a label control.
C#Copy Code
LayoutInfo layoutInfo = mapService.LayoutInfo; 

if (layoutInfo != null) 



    lblLayoutInfo.Text = "Layout properties: " 

        + "Page size = " + layoutInfo.Extent.Width.ToString("#.0") + " by " 

        + layoutInfo.Extent.Height.ToString("#.0") 

        + " " + layoutInfo.Units.ToString() + "."; 



    
Visual BasicCopy Code
Dim layoutInfo As LayoutInfo = mapService.LayoutInfo

If Not IsNothing(layoutInfo) Then

    lblLayoutInfo.Text = "Layout properties: " _

        + "Page size = " + layoutInfo.Extent.Width.ToString("#.0") + " by " _

        + layoutInfo.Extent.Height.ToString("#.0") _

        + " " + layoutInfo.Units.ToString() + "."

End If

Remarks

This object can be used to determine some properties of the layout for an ArcMap Server image service, prior to actually creating a LayoutView. It is available as a property of MapService. To create a LayoutView for generating layout images, use MapService.CreateLayoutView.

The layout should be printed at the physical size specified in LayoutInfo. Other sizes may not create a desirable appearance. If other layout sizes are needed, a new ArcMap document can be created from the original MXD, and the layout changed to the desired size.

This object will be null (Nothing) for standard image services.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.ADF.IMS.Carto.LayoutInfo

See Also

© 2010 All Rights Reserved.