Querying a Topology
Concept Procedure Quick Reference
 
 
 

Use a topology query to retrieve a loaded topology and its associated data from the current drawing or an attached drawing. You can also query part of a topology in a source drawing and work on that part of a topology without having to retrieve all the objects that make up a topology.

There are three differences between using standard queries and topology queries:

Creating a Result Topology

When you use a topology query, you can hold the retrieved information in the current drawing in three types of topology:

You cannot save back the temporary topology to the queried drawings. However, you can save the temporary topology to make it permanent, or you can retain the topology in the current drawing.

Location Queries

Location queries on network topology work in the same way as queries on any other linear or point object.

Topology Data Retrieved by Location Query
Node Nodes
Network Links; also nodes if part of topology
Polygon Polygons if links or centroid selected; also links or nodes if part of polygon topology

Polygons are handled as true areas, not just as boundaries. In the example following, the polygon area crosses through the query boundary so the whole polygon is retrieved, although none of the objects that make up the polygon intersect any part of the query boundary.

Point location queries also retrieve the polygon that includes the point.

Object Data Queries

Any topology object can be queried using object data, such as node, link, and polygon identifiers; the "from" and "to" node information on links; the left and right side information on links; polygons; and so on.

Topology queries can retrieve data such as areas, perimeters, numbers of links, and more. For example, a query to retrieve objects with an area greater than a specified value gives different results with the two query types:

Property Alteration with Topology Queries

When you define a property alteration for topology objects, only specific elements of the topology are altered, as shown in the following table.

Property Alteration Modified Objects
Block Name Nodes in node and network topologies Centroids in polygon topology
Color Nodes, links, and centroids
Elevation Nodes, links, and centroids
Height Nodes in node and network topologies Centroids in polygon topology
Layer Nodes, links, and centroids
Linetype Nodes, links, and centroids
Rotation Nodes in node and network topologies. Centroids in polygon topology
Scale Nodes, links, and centroids
Text Style Nodes in node and network topologies Centroids in polygon topology
Width Links
Text Value Nodes in node and network topologies Centroids in polygon topology (text appears at the centroid label point)
Thickness Links
Hatch Hatched polygons

Saving and Using Queries

If you plan to use a query more than once, you can save it with the current drawing in the Query Library or to an external file, and edit the query or reuse it. The following table shows the options available with topology queries.

Description Procedure Command
Save a query In the Define Query dialog box, click Save. See Saving Queries. ADEQUERY
Run Query (internal) Create tabObject Query panelRun At the Command prompt, enter aderunquery See Running a Saved Query. ADERUNQUERY
Run External Query Create tabObject Query panelExternal At the Command prompt, enter aderunxquery ADERUNXQUERY
Use the Query Library Create tabObject Query panelLibrary At the Command prompt, enter adequerylib See Setting Up a Query Library. ADEQUERYLIB

Report Mode

In addition to the dot variables available using the standard Define Query command, Define Topology Query has two extra dot variables.

Three of the dot variables give different results in topology queries.

The Process Sub-Objects option in the Output Report Options dialog box specifies the objects in a report.

  Reported Data  
Topology Type Process Sub-Objects Do not Process Sub-Objects
Node Nodes, objects, and object data Nodes
Network Links, start and end node data Links
Polygon Centroids, links, and nodes Centroids