ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.Knowledge Namespace / KnowledgeGraph Class / TransformToObjectIDs Method / TransformToObjectIDs(String,IEnumerable<Object>) Method
Name of the Knowledge Graph type the ids are associated with.
The set of ids to translate.
Example

In This Topic
    TransformToObjectIDs(String,IEnumerable<Object>) Method
    In This Topic
    Translates a set of ids for a Knowledge Graph type into objectIDs. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function TransformToObjectIDs( _
       ByVal typeName As String, _
       ByVal ids As IEnumerable(Of Object) _
    ) As IReadOnlyList(Of Long)
    public IReadOnlyList<long> TransformToObjectIDs( 
       string typeName,
       IEnumerable<object> ids
    )

    Parameters

    typeName
    Name of the Knowledge Graph type the ids are associated with.
    ids
    The set of ids to translate.

    Return Value

    The set of object IDs
    Exceptions
    ExceptionDescription
    typeName cannot be empty or null.
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Example
    Transform a set of IDs to objectIDs for an entity
    {
      await QueuedTask.Run(() =>
      {
        var idList = new List<object>() { "{CA2EF786-A10E-4B40-9737-9BDDDEA127B0}",
                                     "{14B5AD65-890D-4062-90A7-C42C23B0066E}",
                                     "{A428D1F6-CB00-4559-AAFD-40885A4F2340}"};
        var kg_props =
                new KnowledgeGraphConnectionProperties(new Uri(url));
        //Connect to the KnowledgeGraph datastore
        //KnowledgeGraph datastores contain tables and feature classes
        using (var kg = new KnowledgeGraph(kg_props))
        {
          string entityName = "Name-of-the-entity";
          var oidList = kg.TransformToObjectIDs(entityName, idList);
        }
      });
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.6 or higher.
    See Also