English

How To: Apply a definition query for a route layer to a route event layer in ArcGIS 8.1.x or 8.2

Summary

Instructions provided describe how to apply a definition query for a route layer to a route event layer in ArcGIS version 8.1.x and 8.2.

Note:
For instructions applicable to ArcGIS version 8.3 and higher, refer to Related Information.

Procedure

The following procedure will work on coverages, shapefiles, geodatabases and OLE DB data. It uses a property that is not available through the ArcMap interface and is accessed only through code.

  1. Start ArcMap.
  2. Select Tools > Macros > Visual Basic Editor.
  3. In the Project Explorer window, expand Project.mxt and select ArcMap Objects > ThisDocument and right-click to select View Code.
  4. Copy the code inside this link into the code module.
  5. Close the Visual Basic Editor.
  6. Select the route layer with the definition query, and select the route event layer while holding the Ctrl key. Both layers must be highlighted with nothing else selected before proceeding to the next step.
  7. Click Tools > Macros > Macros to display the Macros dialog box. Select the macro called ApplyRouteLayerDefQueryToRouteEventLayer and click Run.

    If the route layer's definition query is changed, the route events will not change. To change the route events so they respect the new route definition query, select both layers and run the code again.

    If you want to draw all events, clear the route layer's definition query and select both layers and run the code again.

Related Information