How To: Apply a definition query for a route layer to a route event layer in ArcGIS 8.1.x or 8.2
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.
For instructions applicable to ArcGIS version 8.3 and higher, refer to Related Information.
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.
- Start ArcMap.
- Select Tools > Macros > Visual Basic Editor.
- In the Project Explorer window, expand Project.mxt and select ArcMap Objects > ThisDocument and right-click to select View Code.
- Copy the code inside this link into the code module.
- Close the Visual Basic Editor.
- 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.
- 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.