ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Editing.Attributes Namespace / Inspector Class / LoadAsync Method / LoadAsync(MapMember,Int64) Method
mapMember
object ID
Example

In This Topic
    LoadAsync(MapMember,Int64) Method
    In This Topic
    Load a single feature into the inspector.
    Syntax
    public Task LoadAsync( 
       MapMember member,
       long oid
    )
    Public Overloads Function LoadAsync( _
       ByVal member As MapMember, _
       ByVal oid As Long _
    ) As Task

    Parameters

    member
    mapMember
    oid
    object ID
    Example
    Load a feature from a layer into the inspector
    // get the first feature layer in the map
    var firstFeatureLayer = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetLayersAsFlattenedList().
        OfType<ArcGIS.Desktop.Mapping.FeatureLayer>().FirstOrDefault();
    
    // create an instance of the inspector class
    var inspector = new ArcGIS.Desktop.Editing.Attributes.Inspector();
    // load the feature with ObjectID 'oid' into the inspector
    await inspector.LoadAsync(firstFeatureLayer, oid);
    
    Load map selection into Inspector
    // get the currently selected features in the map
    var selectedFeatures = ArcGIS.Desktop.Mapping.MapView.Active.Map.GetSelection();
    // get the first layer and its corresponding selected feature OIDs
    var firstSelectionSet = selectedFeatures.ToDictionary().First();
    
    // create an instance of the inspector class
    var inspector = new ArcGIS.Desktop.Editing.Attributes.Inspector();
    // load the selected features into the inspector using a list of object IDs
    await inspector.LoadAsync(firstSelectionSet.Key, firstSelectionSet.Value);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also