This example covers the creation and use of simple "brush" and "pen" filters plus a "compound" filter which combines the brush and pen filters.
For this example consider the following map window:
The pen outlines of each of the Polygons in the above window are set to Rust.
Select Find [Home-Selection] , the following Find dialog will be displayed:
At the Filter tab select the pass or fail radio button according to whether the filter is to select items that pass the filter or fail the filter.
Select the drop down box and choose Property Filter (Default).
Click the arrow to the right of Property Filter at the bottom of the drop down box.
The Expression Builder dialog will be displayed:
In the Expression Builder dialog go to the Expression operations pane, expand Values and select Built-in properties.
The list of values will be shown in the Expression values pane.
Select Brush and click the Insert button.
_brush$ will appear in the top pane.
In the top pane enter ="Green" after _brush$.
The expression will now be _brush$="Green"
Click OK.
Control will now be returned to the Find dialog:
Check that pass or fail is selected as required.
Enter the name the filter in the Save filter as box and click Save Now. In this example the brush filter is saved as Green Brush.
Click OK.
The created Green Brush filter will be displayed in the Libraries Control Bar.
Commence the pen filter creation procedure in the same manner as for the brush filter procedure.
In the Expression values pane select Pen, instead of Brush, click the Insert button and append the required colour, Rust for example, to _pen$.
The expression in the top pane will now be _pen$="Rust"
The rest of the procedure is identical to the brush procedure.
Save the filter as Rust Pen for example.
The created pen filter will be displayed in the Libraries Control Bar:
Select Find [Home-Selection] to display the Find dialog:
Again select the pass/fail option as required.
Select the drop down box and choose Compound Filter (Default).
Click the arrow to the right of Compound Filter at the bottom of the drop down box.
The Compound Filter dialog will be displayed:
Use the drop down boxes to select the First filter and Second filter. In this example Green Brush and Rust Pen respectively.
Select the Combination (items must pass...), these are:
AND
Combined filter will allow items that pass both filters.
OR
Combined filter will allow items that pass at least one of the filters
XOR
Combined filter will allow items that pass exactly one of the filters
DIFF
Combined filter will allow items that pass the first filter, but do not pass the second filter. If you do not select a first filter, then this has the effect of inverting the second filter.
The created filters are displayed in the Libraries Control Bar.
Use the Filter Apply/Edit Filter... local command to apply a filter.
Note: Selecting Reset will remove all filters from the overlay.
Replace existing filter - the chosen filter will replace any existing filter.
Combine with existing filter - the chosen filter will be combined with any existing filter, so items will have to pass both filters.
Select the required filter from the drop-down list and click OK.
The chosen filter will now be applied to the overlay.
In this example the Green Brush filter will display:
In this example the Rust Pen filter will display:
In this example the Compound filter will display one of the following, depending on the Combination setting made in the Compound Filter dialog (described above):
AND:
OR:
XOR:
DIFF:
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).