Problem with the NE_BARRIER FlagAttRec Type enumerator

Last Published: April 25, 2020


It is not possible to use the NE_BARRIER enumerator as the Type field of a FlagAttRec structure.


The NE_BARRIER enumerator has not yet been implemented into the NetEngine library. The online help topic FlagAttRec should not mention this enumerator.

Solution or Workaround

At a future version of NetEngine, the NE_BARRIER enumerator may be implemented as a valid Type value for the FlagAttRec structure. The designed intent of this type of flag is for a barrier to be placed anywhere on any element (most probably an EDGE) of a netview, and subsequently solved operations will not allow a path to traverse through the barrier overriding what is currently set as weights on that element.

The two alternative solutions listed below allow you to block off an entire element from the solver; however, there is currently no way to block off only a portion of an edge, as the NE_BARRIER will provide.

  • Use the NE_SetBarriers function to set barriers onto the netview at run-time, in memory, on the fly. This function uses a call-back function that you must write. The call-back function will receive an element handle, then your function will decide whether or not that element should be traversed. To do this, your call-back function should test the element ID and return True or False.

  • Edit the network itself. You can edit the weight, upon which you are solving, to a negative number. Any element, that has a negative value as its weight, will not be traversed by the solver, and as such it will not be included in any result network.

    A convenient way to convert a weight value to a negative number is to simply multiply it by -1; thus, the absolute value is retained. You can multiply again by -1 to revert to the original value.

Article ID:000004095

  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic