This document is archived and information here might be outdated.  Recommended version.


IMxdServer.ExportLegend Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Carto)  

IMxdServer.ExportLegend Method

Exports a legend to an image file. The client can create the pLegend object and set its desired properties appropriately. If pLegend is null, a default legend for the default map will be generated.

[Visual Basic .NET]
Public Sub ExportLegend ( _
    ByVal Legend As ILegend, _
    ByVal MapDescriptor As IMapDescriptor, _
    ByVal Dpi As Integer, _
    ByVal imageWidth As Integer, _
    ByVal imageHeight As Integer, _
    ByVal BackgroundColor As IColor, _
    ByVal fileType As String, _
    ByVal outputFileName As String _
)
[C#]
public void ExportLegend (
    ILegend Legend,
    IMapDescriptor MapDescriptor,
    int Dpi,
    int imageWidth,
    int imageHeight,
    IColor BackgroundColor,
    string fileType,
    string outputFileName
);
[C++]
HRESULT ExportLegend(
  ILegend* Legend,
  IMapDescriptor* MapDescriptor,
  Long Dpi,
  Long imageWidth,
  Long imageHeight,
  IColor* BackgroundColor,
  BSTR fileType,
  BSTR outputFileName
);
[C++]

Parameters Legend [in]
Legend is a parameter of type ILegend MapDescriptor [in]
MapDescriptor is a parameter of type IMapDescriptor Dpi [in] Dpi is a parameter of type Long imageWidth [in] imageWidth is a parameter of type Long imageHeight [in] imageHeight is a parameter of type Long BackgroundColor [in]
BackgroundColor is a parameter of type IColor fileType [in] fileType is a parameter of type BSTR outputFileName [in] outputFileName is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also

IMxdServer Interface