I have ILayer, how do i obtain INALayer,

if (TypeOf layer Is INALayer) is false?

I am using ArcGIS 9.3.1


Part of This sample, among other things, shows how to get a reference to the INALayer. Basically, it goes like this:

// app is an IApplication reference
ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension naExt = 
    app.FindExtensionByName("Network Analyst");
ESRI.ArcGIS.NetworkAnalystUI.INAWindow naWindow = naExt.NAWindow;
if (naWindow.ActiveAnalysis == null || naWindow.ActiveCategory == null)
        "There must be an active analysis layer and an active category");
    return ;
ESRI.ArcGIS.NetworkAnalyst.INALayer naLayer = naWindow.ActiveAnalysis;
  • Can we do the same for ArcGIS Server? – Sam007 Sep 23 '11 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.