AnsweredAssumed Answered

Engine Network Analyst Window Command disabled

Question asked by croemer on Nov 25, 2014
Latest reply on Dec 3, 2014 by croemer


i'm not shure if my question is here at the right place, i delelope with VS 2013, ArcObjects .NET an ArcGIS Engine Application, current Version 10.2.1.


I have an problem with the network analyst extension.

After a route is added the commands on the network analyst toolbar are not enabled (show network analyst window command and later the solve commands). I compared our Coding with the ExampleCode unter ArcObjects Help for .NET  (ArcGIS Network Analyst extension Engine application


I couldn‘t find the point which variable has to be set, that the NetworkAnalyst Toolbar activates the Commands The Code of the Toolbar is hidden, so I just know that there have to be some Events to which the ToolbarControl responds to activate the Command for the NetworkAnalystWindow and later when Locations are added to activate the other Commands/Tools (ex. Calculate). So my question is, which variables have to be set, that these Tools get activated?

in the example code are the Commands enabled in my code not.

Our code is differnent to the example code, that our application has beside the mapcontrol an pagelayoutcontrol.

This is a fragment of my code:




IExtension ext = m_naEnv as IExtension;

object obj = axToolbarControl3.Object;

ext.Startup(ref obj);

m_naWindow = m_naEnv.NAWindow;

m_onContextMenu = new IEngineNAWindowEventsEx_OnContextMenuEventHandler(OnContextMenu); ((IEngineNAWindowEventsEx_Event)m_naWindow).OnContextMenu += m_onContextMenu;

m_OnNetworkLayersChanged = new IEngineNetworkAnalystEnvironmentEvents_OnNetworkLayersChangedEventHandler(OnNetworkLayersChanged); ((IEngineNetworkAnalystEnvironmentEvents_Event)m_naEnv).OnNetworkLayersChanged += m_OnNetworkLayersChanged; m_OnCurrentNetworkLayerChanged = new IEngineNetworkAnalystEnvironmentEvents_OnCurrentNetworkLayerChangedEventHandler(OnCurrentNetworkLayerChanged); ((IEngineNetworkAnalystEnvironmentEvents_Event)m_naEnv).OnCurrentNetworkLayerChanged += m_OnCurrentNetworkLayerChanged;



Christoph Römer