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


Create Dynamic Glyph from Symbol Snippet (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference

Create Dynamic Glyph from Symbol Snippet

Create a dynamic glyph for a supplied symbol.

[C#]
///<summary>Create a dynamic glyph for a supplied symbol.</summary>
///  
///<param name="dynamicGlyphFactory">An IDynamicGlyphFactory interface that will be used to create the new glyph.</param>
///<param name="symbol">An ISymbol interface that is the symbol used to generate the new glyph.</param>
///  
///<returns>An IDynamicGlyph interface.</returns>
///  
///<remarks>This method will create the glyph according to the input symbol</remarks>
public ESRI.ArcGIS.Display.IDynamicGlyph CreateDynamicGlyphFromSymbol(ESRI.ArcGIS.Display.IDynamicGlyphFactory dynamicGlyphFactory, ESRI.ArcGIS.Display.ISymbol symbol)
{
    if (null == symbol)
        return null;

    return dynamicGlyphFactory.CreateDynamicGlyph(symbol);
}
[Visual Basic .NET]
'''<summary>Create a dynamic glyph for a supplied symbol.</summary>
'''  
'''<param name="dynamicGlyphFactory">An IDynamicGlyphFactory interface that will be used to create the new glyph.</param>
'''<param name="symbol">An ISymbol interface that is the symbol used to generate the new glyph.</param>
'''  
'''<returns>An IDynamicGlyph interface.</returns>
'''  
'''<remarks>This method will create the glyph according to the input symbol</remarks>
Public Function CreateDynamicGlyphFromSymbol(ByVal dynamicGlyphFactory As ESRI.ArcGIS.Display.IDynamicGlyphFactory, ByVal symbol As ESRI.ArcGIS.Display.ISymbol) As ESRI.ArcGIS.Display.IDynamicGlyph

  If Nothing Is symbol Then
    Return Nothing
  End If

  Return dynamicGlyphFactory.CreateDynamicGlyph(symbol)

End Function

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Display