Displaying facilities and buildings near a group of sewer mains

This example shows how to use a Map Drawer to display both buildings and facilities near a group of sewer mains. This involves adding items and commands to the AssetManagement.Asset:AssetLookupApplet Map Drawer. To begin, add the “Show Nearby Facilities” item with the same initialization source as in the previous example.

See Displaying facilities near a group of sewer mains.

Next, add an item called “Show Nearby Buildings" with these attributes:

Attribute Value
id 3
test Show Nearby Buildings
title Nearby Buildings

Like “Show Nearby Facilities,” this item has a grid source under the INITSOURCES node. The source has these attributes:

Attribute Value
display selected
moniker Hansen.AssetManagement.Asset
name gdSearch
type grid

The third new item will show both buildings and facilities:

Attribute Value
id 4
text Show Nearby Building and Facilities
title Nearby Building and Facilities

Like the two other items, “Show Nearby Buildings and Facilities” has a grid source under the INITSOURCES node.

Next, add a “Nearby Facilities” query command with these attributes:

Attribute Value
closemap False
id 4
items 2,4
querymoniker Hansen.AssetManagement.Plant.PlantFacility
state on
text Nearby Facilities
type query

The items attribute specifies 2 and 4, which are the IDs of the “Show Nearby Facilities” and “Show Nearby Buildings and Facilities” items. The “Nearby Facilities” layer is displayed when you open the Map Drawer from either of these items, but not if you use “Show Nearby Buildings.”

Finally, add a similar “Nearby Buildings” command. In this case the command applies to items 3 and 4.

Attribute Value
closemap False
id 5
items 3,4
querymoniker Hansen.AssetManagement.Building.Building
state on
text Nearby Buildings
type query

When you open the Sewer Main Lookup you’ll see the three new menu items in the Map Drawer menu.