This macro is for V8i only.
The attached macro provides an alternate method of searching and locating XFM features. This simple yet customizable search option may be a good alternative to using the generic and complex capabilities offered by Bentley Map's Query tool.
The Feature Query tool uses customizable query files (*.QRY) to define searches and may include such items as the feature table to use, the attribute name, the title of the search and so on. A template is provided showing the supported parameters.
A sample design file and queries are provided. The design file contains parcels, addresses and communications data for a few city blocks.
The following example performs a query on a single property:
The following example queries two properties from the same table. In this case, the street name and house number:
When the Feature Query tool is configured for the active workspace of a Bentley Map or Bentley Map based tool (OpenUtilities, Bentley Comms, etc), it can be started with the following key in: vba execute [xfmFeatureQuery] OpenDialog
This keyin can be added to a custom button or a function key for quick access.
When started, the Feature Query dialog will open and list the available queries found in MS_GEOWSHOME\qry folder.
If the macro does not find a location with query files, it will abort with an error message and not open the dialog.
Select one of the available query options. In single property mode, the Feature Query dialog changes to show a second property list containing the available property values and a de-activated search button.
In dual property mode, the dialog shows a second property list containing the available property values as well as a de-activated third option list and search button.
Note that you can switch from one search query to the next.
Select the property or properties to search. In single property mode, the selected property will activate the Search button.
In dual property mode, the first selection will activate the next option list. A selection in the next option list will then activate the search button.
Click the Search button to execute the search. When a single feature is found, the Feature Query tool will select and zoom to the feature in the active view.
When multiple features are found, the Feature Query tool will load the results into the Data Browser for further exploration.
Note that the Feature Query tool is modeless which allows you to keep the dialog open and execute multiple queries during your design session.
You have the option to specify language specific titles and label parameters in the query files.
The Feature Query tool checks the operating system for the language defined in the regional settings. Based on that setting, it will try to load a string in the appropriate language. Currently, English (=default) and German strings are included.
The Feature Query tool has the following known limitations.
Disclaimer - This application is supplied as-is and does not come with support. Bentley Systems Inc., and the author of this programs assume no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this application at your own risk.