ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMFilteredFindPathsPathFilter Class / ItemType Property
Example

In This Topic
    ItemType Property (CIMFilteredFindPathsPathFilter)
    In This Topic
    Gets or sets whether the path filter is used for entities or relationships.
    Syntax
    Public Property ItemType As KGPathFilterItemType
    public KGPathFilterItemType ItemType {get; set;}
    Example
    Run FFP Using Path Filters
    {
      //using ArcGIS.Core.Data.Knowledge.Extensions;
    
      await QueuedTask.Run(() =>
      {
        var ffp_config = new CIMFilteredFindPathsConfiguration();
        ffp_config.Name = "Run FFP w Path Filters";
    
        //set origin entities
        //set destination entities
    
        //set path filters
        var pathFilters = new List<CIMFilteredFindPathsPathFilter>();
    
        var path_filter = new CIMFilteredFindPathsPathFilter();
        path_filter.ItemTypeName = "POI";
        path_filter.ItemType = KGPathFilterItemType.Entity;
        //To select specific entities, set the ID property or provide a filter predicate
        //path_filter.ID = "{B1C2D3E4-F5A6-7B8C-9D0E-1F2A3B4C5D6E}";//set a specific id
        //...or...use a predicate
        //path_filter.PropertyFilterPredicate = "n.name = 'Robert Johnston'";
    
        //Use IncludeOnly to only consider entities of this type in the path
        path_filter.FilterType = KGPathFilterType.IncludeOnly;
        //Use Exclude to ignore paths that contain excluded types
        path_filter.FilterType = KGPathFilterType.Exclude;
        //Use MandatoryWaypoint if you have specific entities/entity types through
        //which all paths must pass through at least one entity of this type
        path_filter.FilterType = KGPathFilterType.MandatoryWaypoint;
        //Use OptionalWaypoint if you have specific entities/entity types through
        //which all paths must pass through at least one entity from any of the
        //optional waypoints
        path_filter.FilterType = KGPathFilterType.OptionalWaypoint;
        //Add the path filter(s) to the collection
        pathFilters.Add(path_filter);
    
        //Add more filters as needed
        //"Person", "Supplier", "Plant", etc.
    
        //Path Filters
        ffp_config.PathFilters = pathFilters.ToArray();
        //TODO - use the config
        //var results = kg.RunFilteredFindPaths(ffp_config);
        // ...
      });
    }
    Requirements

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

    ArcGIS Pro version: 3.3 or higher.
    See Also