ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMapFactory Interface / CreateLinkChart Method / CreateLinkChart(String,KnowledgeGraph,KnowledgeGraphLayerIDSet,String) Method
The name of the map.
A knowledge graph datastore.
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 knowledgeGraph.

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

    Parameters

    name
    The name of the map.
    knowledgeGraph
    A knowledge graph datastore.
    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 knowledgeGraph.

    Return Value

    A map of type MapType.LinkChart.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    knowledgeGraph 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 datastore as knowledgeGraph.
    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