ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMapFactory Interface / CreateLinkChart Method / CreateLinkChart(String,Uri,KnowledgeGraphLayerIDSet,String) Method
The name of the map.
A Uri link to a knowledge graph service.
A set of Named Object types and record ids that sets the content of the Knowledge Graph layer. See KnowledgeGraphLayerIDSet.
The path to a link chart to use as a template for layout and styling. Use null or an empty string to create the link chart with the default layout and styling. If specified, the template link chart must use the same knowledge graph service as knowledgeGraphServiceUri.

In This Topic
    CreateLinkChart(String,Uri,KnowledgeGraphLayerIDSet,String) Method
    In This Topic
    Creates a link chart map (a map of type MapType.LinkChart) with a specified knowledge graph service. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    name
    The name of the map.
    knowledgeGraphServiceUri
    A Uri link to a knowledge graph service.
    idSet
    A set of Named Object types and record ids that sets the content of the Knowledge Graph layer. See KnowledgeGraphLayerIDSet.
    templateLinkChartPath
    The path to a link chart to use as a template for layout and styling. Use null or an empty string to create the link chart with the default layout and styling. If specified, the template link chart must use the same knowledge graph service as knowledgeGraphServiceUri.

    Return Value

    A map of type MapType.LinkChart.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    knowledgeGraphServiceUri cannot be null.
    templateLinkChartPath either does not exist in the current project, is not a Link Chart, does not contain a Knowledge Graph layer or does not contain the same Knowledge Graph service as knowledgeGraphServiceUri.
    idSet contains invalid Name Object types..
    Remarks
    The KnowledgeGraph layer created in the Link Chart contains sub layers for each Named Object type. To set the output content of the KnowledgeGraph composite layer, add an entry to the idSet for each Named Object type to be included in the output along with a list of their relevant record ids. Specify a null or empty list for a given entry to include all the records for that particular type at the time of creation.
    Note: Named Object names in a ID set entry are case-sensitive.
    If there are Named Object type names specified in the ID set that do not match a Named Object type name in the KnowledgeGraph then a KnowledgeGraphLayerException will be thrown when the layer is created. The exception will contain the list of invalid Named Object types.

    If you specify a null or empty IDSet, then the KnowledgeGraph layer will contain all the sub layers for the Named Object types but the sub layers will contain no content.

    See KnowledgeGraphLayerIDSet
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also