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

IDynamicLayer.DrawDynamicLayer Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > ID > IDynamicLayer Interface > IDynamicLayer.DrawDynamicLayer Method
ArcGIS Developer Help

IDynamicLayer.DrawDynamicLayer Method

Draws the layer to the specified display for the given draw phase.

[Visual Basic .NET]
Public Sub DrawDynamicLayer ( _
    ByVal DynamicDrawPhase As esriDynamicDrawPhase, _
    ByVal Display As IDisplay, _
    ByVal DynamicDisplay As IDynamicDisplay _
public void DrawDynamicLayer (
    esriDynamicDrawPhase DynamicDrawPhase,
    IDisplay Display,
    IDynamicDisplay DynamicDisplay
HRESULT DrawDynamicLayer(
  esriDynamicDrawPhase DynamicDrawPhase,
  IDisplay* Display,
  IDynamicDisplay* DynamicDisplay
DynamicDrawPhase [in]

DynamicDrawPhase is a parameter of type esriDynamicDrawPhase Display [in]
Display is a parameter of type IDisplay* DynamicDisplay [in]
DynamicDisplay is a parameter of type IDynamicDisplay*

Product Availability

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


Use this method to generate the Layer�s draw commands that correspond to the Dynamic Draw Phase.

Make sure to generate the draw commands at the desired Draw Phase. It is recommended for a Dynamic Layer to generate draw commands (and therefore be drawn) in one of the Dynamic Draw Phases, but not both. For example, if the layer is to be drawn only in the Immediate Phase, the method should inspect the drawing phase and only generate draw commands if enum esriDynamicDrawPhase is set to esriDDPImmediate.

Use the Dynamic Display API, and/or OpenGL API in order to generate the draw commands. In the context of the DrawDynamicLayer method, the OpenGL Rendering Context is active and is setup by the Dynamic Map.

Note: The Dynamic Display and OpenGL API's can safely be used only in the context of the IDynamicLayer.DrawDynamicLayer method and IDynamicMapEvents BeforeDynamicDraw\AfterDynamicDraw events. Any attempt to use them in any other context will result in unexpected behavior.

See Also

IDynamicLayer Interface