ArcFM Gas Trace Weight Inspector

The ArcFM Solution uses trace weights on geometric features to inform its tracing functions about one or multiple attributes on a given feature – using this to determine whether to go or stop. It’s a very effective use of technology provided in ArcGIS and helps ensure traces are fast.

Generally a user need not be concerned about the contents of the trace weight field, typically named ELECTRICTRACEWEIGHT in an electric model or GASTRACEWEIGHT in a gas model or WATERTRACEWIGHT in a water model. It’s often the case that these fields are hidden from the user using ArcFM field configuration properties. But there are times when inspecting the trace weight value can be important – particularly early in the life cycle of your database, or when loading data when you want to make sure your loading processes are operating as expected.

ArcFM Gas Trace Weight

Schneider Electric recognizes this need and has provided, for electric networks, a “Feeder Manager Translator” that interprets the contents of the trace field and presents results in a human-readable format.

The coded information in the trace weight field is not purposely encrypted, but stored as a “bit-gate” value to optimize processing performance.

The information also isn’t secret – its published on the ArcFM resources site. Here, for example is a link to the page describing electric junctions:

For gas and water users the same information is published on the SE site, but there is no handy tool to easily interpret the contents of a gas or water trace weight. That’s what this case study will talk about.

Here’s what we’re going to assume:

  • The user has an open ArcMap session containing features from a gas network.
  • The user has a set of selected features, some of which may be network features, some not.
  • Features in the gas network have a field named GASTRACEWEIGHT
  • The user is editing — which just makes the process of getting selected features easier, with more code we could make this work on selected features outside an edit session

With that, we want to provide a tool to inspect the selected set and interpret the contents of GASTRACEWEIGHT values. In the end we’ll have something like this:


It’s actually pretty straightforward. As you can see, we’ll start with a form that has two ListView controls, one for devices and one for pipes. In the Execute method of the form we’ll loop through the selected features, determine which ones have a GASTRACEWEIGHT field and process them.

Next, we’ll need a quick way to determine whether a particular bit in question is set within an integer value. That’s what the IsBitSet routine will do.

Now, since were’ reporting results in a ListView we’ll set up a routine to add sub items for a given ListItem and assign the item a fore color.

Now we get to the meat of the matter. First we’ll interpret bit settings for gas point features. For reference these bit gate settings are defined on the SE ArcFM page Of course we could put this in a loop and reduce some code, but in this case we want to call out the purpose of each bit in the trace weight value for clarity.

Lastly, we’ll interpret trace weight values for line features (pipes in the gas network.) This process follows the same pattern we used for points, but there are fewer properties stored in the trace weight value for pipes than we saw with devices.

So, that’s it. You can certainly spice up the user interface, or incorporate this as a right-click tool accessed from the Attribute Editor, or do any number of other things with this basic logic. But that’s how we can interpret the trace weight value.