Sample - Compatible Unit Filter: Area Filter

Version 2

    Versions: 10.0.3 - current

    Product Availability: ArcFM Desktop (Designer)

     

    This sample area filter defines a polgon in the code. It then defines the compatible units (CUs) to be filtered when another work request polygon intersects the hardcoded polygon area. This sample illustrates how you can create a custom area filter for use with the CU filter.

    CustomAreaFilter.png  

     

    You will likely want to modify the code to look-up your specific CUs (rather than those that have been hardcoded) as well as define a polygon or area that may be intersected with the work request polygon.


    How to Implement:

    1. You may modify the code sample. This step is not required.
    2. Build the solution sample.

     

    How to Use:

    This sample area filter is available only in ArcMap. It requires that you use the Minerville.mdb sample data.

    1. In ArcMap, open a design.
    2. Draw the work request polygon in an area that intersects the hardcoded polygon. In the Attribute Editor, select the Design tab and highlight the work request. Click the Edit button in the Shape field to place the polygon. The area defined in the developer sample is quite large.
    3. Open the CU Filter.
    4. Click the Add Filters button, select the Sample Area CU Search filter and click Add. The filter displays the CUs associated with the area. In this case, they are hardcoded to PW100-1 and PW100-2. You will likely want to modify this portion of the code to point to a table with the CUs you want to apply to this filter.

     

    Requires:

    All of the files shown below are required for the solution to build successfully.

     

    FileDescription
    SampleCuAreaFilter.csprojC# project containing the code to generate the area filter.
    SampleAreaFilter.csClass module that defines the sample filter.
    SampleAreaFilterView.xamlThe XAML that defines the user interface for the sample filter.
    SampleAreaFilterView.xaml.csThe class module behind the XAML that defines the user interface.
    SampleAreaFilterViewModel.csThe class module that integrates the filter with the user interface.
    AssemblyInfo.csClass module to support the tool.