Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have ILayer, how do i obtain INALayer,

if (TypeOf layer Is INALayer) is false?

I am using ArcGIS 9.3.1

share|improve this question
up vote 3 down vote accepted

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;
share|improve this answer
Can we do the same for ArcGIS Server? – Sam007 Sep 23 '11 at 12:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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