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).
How to Implement:
- You may modify the code sample. This step is not required.
- 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.
- 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.
- 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.
- In ArcMap, open a design.
- Open the CU Filter.
- Click Add Filter and select the Sample Take-Off CU Search filter. Click Add.
- Click a feature on the map (e.g., a gas valve).
- 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.
All of the files shown below are required for the solution to build successfully.
|SampleCuTakeoffFilter.csproj||C# project containing the code to generate the take-off filter.|
|SampleTakeoffFilter.cs||Class module that defines the sample filter.|
|SampleTakeoffFilterView.xaml||The XAML that defines the user interface for the sample filter.|
|SampleTakeoffFilterView.xaml.cs||The class module behind the XAML that defines the user interface.|
|SampleTakeoffFilterViewModel.cs||The class module that integrates the filter with the user interface.|
|AssemblyInfo.cs||Class module to support the tool.|