ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureLayer Class / LookupSymbol Method
Object id of the feature to lookup
The viewer whose scale or camera will be used

In This Topic
    LookupSymbol Method
    In This Topic
    Looks up the symbol for the corresponding feature identified by the object id. This method will return null when the input OID is not part of the feature layer definition or if the renderer returns a null symbol. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public CIMSymbol LookupSymbol( 
       long oid,
       MapView view
    )
    Public Function LookupSymbol( _
       ByVal oid As Long, _
       ByVal view As MapView _
    ) As CIMSymbol

    Parameters

    oid
    Object id of the feature to lookup
    view
    The viewer whose scale or camera will be used

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    MapView is null
    Unsupported renderer type
    Remarks
    The looked up symbol takes into consideration the current view extent (2D) or camera distance from the ground (3D) and reference scale. Visual variables present on the renderer for color, size*, transparency, and rotation are applied.
    Not all renderers support symbol lookup. Check CanLookupSymbol to determine if the given feature layer renderer can support symbol lookup. Calling LookupSymbol on a layer with an unsupported renderer will throw a System.InvalidOperationException
    *Size visual variable with 3D views is currently assumed to be proportional on all symbol axis.
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also