ArcGIS Pro 3.6 API Reference Guide
ArcGIS.Core.CIM Namespace / KGPathFilterType Enumeration
Example Example

In This Topic
    KGPathFilterType Enumeration
    In This Topic
    Specifies the filter type of a path filter used in filtered find paths.
    Syntax
    Members
    MemberDescription
    Exclude The filtered find paths algorithm will ignore paths that contain excluded types (type is not active).
    IncludeOnly The filtered find paths algorithm will only consider paths which contain included types (type is active). If a path filter does not use the include only option, all types are active.
    MandatoryWaypoint The filtered find paths algorithm will only consider paths passing through the all the mandatory waypoints.
    OptionalWaypoint The filtered find paths algorithm will only consider paths passing through at least one of the optional waypoints.
    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();
        });
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Core.CIM.KGPathFilterType

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.3 or higher.
    See Also