XTools Website

 

Note: this tool is updated in XTools Pro 16.1

 

Definition Query Manager

 

 

Purpose

 

Definition Query Manager is provided for more efficient work with definition queries in ArcGIS. Extending standard queries it supports multiple definition queries applied to one layer and also allows turning selections to definition queries.

 

Description

 

Definition Query Manager provides a button on the toolbar for turning on/off current definition query applied to the selected layer (or a few selected layers) and the Query Manager itself is available from the layer context menu (Definition queries menu item) in the TOC window and from the main toolbar menu.

 

With this feature you can create as many queries as you need and easily switch between them.

 

Usage

 

Typical usage scenarios for the Definition Query Manager tool include:

 

  • Turning current definition queries on and off for the selected layer from the toolbar

  • Determining if there are definition queries currently applied to the selected layer

  • Creating multiple definition queries for one layer

  • Managing all queries for all map layers from one place

  • Switching between queries

  • Turning selections to definition queries

  • Assigning tags to queries in order to group queries (layers)

 

Turning current definition queries on and off from the toolbar

 

 

Having selected a layer with a definition query applied you can turn the query on and off pressing the button on the toolbar. If the query is currently applied then the button is highlighted as selected. This way you can always see if the definition query is currently applied to the selected layer, meaning:

 

- Definition query icon disabled: no definition query for the layer

- Definition query icon enabled: there is at least one definition query specified for the layer but not applied at the moment

- Definition query icon enabled and highlighted: there is a definition query currently applied to the layer

 

Creating new definition queries and managing queries

 

Definition query manager dialog is available from the layer context menu in the TOC window:

 

 

Using the Definition Query Manager you can create as many queries as you need. The manager displays all layers in the current map, you can manage definition queries for all layers from one single place.

 

 

With the Definition Query Manager dialog you can:

 

- Create new definition queries with a standard Query Builder dialog

- Edit existing queries with the same standard dialog

- View the selected query info (shows number of features selected by the query)

- Remove selected query or all queries

- Remove all added queries (this does not remove standard queries)

- Load/save queries

- Activate/deactivate queries

- Pan and zoom to the selected queries on the map

 

 

Last but really not least, queries may have names. In those cases when you may have quite complicated queries it can be more convenient to use shorter names instead of queries. These names are then displayed in the layer context menu. By default queries are named as Query 1, Query 2 etc. but you can rename them any time as you need. For those queries created using the standard way query itself is displayed as name.

 

New queries can be also created the usual way in the Layer Properties dialog, they will be recognized by the Definition Query Manger you will be able to create a new query from such current queries.

 

Switching between definition queries

 

Having a few definition queries created for a layer you can promptly switch between them from the layer context menu:

 

 

For the convenient work with multiple definition queries the menu displays the names that can be shorter and more meaningful than queries themselves. Besides, when you hover the mouse pointer over the query name the underlying query is displayed as well.

 

Turning selections to definition queries

 

Definition Query Manager in XTools Pro allows turning current selections to definition queries. This can be made in two ways for the layers with selected features:

- From the layer's context menu, see the screenshot above

- In the Definition Query Manager dialog, using the From Selection button in the list on the right

 

At that, there is a maximum limit applied to the number of selected features that you can turn to a definition query. If there are more than 2000 features selected you won't be able to make a definition query from them and a corresponding message will be prompted.

 

This may be considered as an additional way to create definition queries - either manually, selecting features with a mouse, or using advanced selecting capabilities in ArcMap (Select by Attributes, Select by Location, Select by Graphics).

 

Working with tags

 

Tags is a new feature for definition queries allowing to group a few layers with definition queries assigning them the same tag. Then you can work with such groups/tags simultaneously - activate grouped queries at once, zoom, pan to them etc.

 

 

Tag names are unique for the layer, one tag can be assigned only to one query for the layer.

If definition query with tag is copied and there is a tag with the same name already existing then copied tag is renamed to "tag_copy".

 

Same as with separate queries there is a number of operations supported for tags, you can:

- Apply tag

- Unassign tag from all layers

- Rename tag

- Pan or zoom to the features from the layers grouped with selected tag

- Reset all queries assigned with selected tag

 

 

 

Notes:

  • Working with XTools Pro Definition Query Manager and creating queries the standard way in the Layer properties dialog, please make sure to add and save such queries in the list of queries (i.e. create from current query). Unsaved queries are lost when disabled from the Layer context menu, in the Layer Properties dockable window and in the MXD Info dialog.

  • For selection layers unique values from all features of the original layer will be presented in query builder.

 

---

 

Table of Contents

-Search-

Back