Sample - Compatible Unit Filter: Take-Off Filter

Version 2

    Versions: 10.0.3 - current

    Product Availability: ArcFM Desktop (Designer)

     

    This sample take-off filter provides a hardcoded list of CU codes when the user clicks a take-off point. It uses the ICuTakeoffFilter interface to pass in the feature on which the user clicked to intiate the take-off filter. This sample illustrates how you may create a custom take-off filter for use with the CU filter. You will likely want to modify the code to look-up your specific CUs (rather than those that have been hardcoded).

    TakeOffFilter.png  

     

    How to Implement:

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

     

    How to Configure:

    Typically, the user can create a take-off filter in the CU Administration tool in ArcCatalog. The CU Administration tool automatically assigns the CUDOMAINFILTER model name to the take-off feature (the feature to which the cursor snaps indicating the take-off point). When using this developer sample, you'll need to assign the model name manually to the take-off point to ensure the sample filter behaves properly.

    1. Add the CUDOMAINFILTER model name to a class domain on the geodatabase.          
      • In ArcCatalog, right-click the geodatabase and select Properties. On the Domains tab, select a domain (e.g., Designer Object Class Model Name) and add the CUDOMAINFILTER model name to it. Click OK on the Database Properties window.
    2. Assign the CUDOMAINFILTER model name to a take-off filter in the geodatabase (e.g., GasValve).          
      • In ArcCatalog, right-click the take-off point and select ArcFM Properties Manager. Choose the Model Names tab. In the Model Name Domain field, select the domain to which you added the model name in the previous step. Double-click the model name in the Available column to move it to the Selected column. Click OK on the ArcFM Properties Manager.

     

    How to Use:

    This sample area filter is available only in ArcMap.

    1. In ArcMap, open a design.
    2. Open the CU Filter.
    3. Click Add Filter and select the Sample Take-Off CU Search filter. Click Add.
    4. Click a feature on the map (e.g., a gas valve).
    5. The CU filter displays the hardcoded CUs as a result of that filter (in the sample they are gas valve CUs). If you have additional take-off filters implemented, they may filter out the hardcoded values. Remove any additional features if necessary.

     

    Requires:

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

     

    FileDescription
    SampleCuTakeoffFilter.csprojC# project containing the code to generate the take-off filter.
    SampleTakeoffFilter.csClass module that defines the sample filter.
    SampleTakeoffFilterView.xamlThe XAML that defines the user interface for the sample filter.
    SampleTakeoffFilterView.xaml.csThe class module behind the XAML that defines the user interface.
    SampleTakeoffFilterViewModel.csThe class module that integrates the filter with the user interface.
    AssemblyInfo.csClass module to support the tool.