1 Reply Latest reply on Jan 22, 2015 12:37 AM by Ondrej Fialik

    No data in MMFeatureTopLevel

    Ondrej Fialik

      Hello,

      i use this code to get new empty ID8ListItem, but m_pSelectionItem is null. After that, what i click in ArcGIS to TOC Feature tab all is ok.

      How can initiate MMFeatureTopLevel in the code?

       

      Thanks for the answer


      IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)pWorkspace;

      IExtension featureTab = m_application.FindExtensionByName("FeatureTopLevel");

       

      MMFeatureTopLevel m_featTopLvl = featureTab as MMFeatureTopLevel;

       

      ID8List list = m_featTopLvl as ID8List;

      list.Reset();

      ID8ListItem m_pSelectionItem = list.Next();              

       

      while (m_pSelectionItem != null)

      {

      }


        • Re: No data in MMFeatureTopLevel
          Ondrej Fialik

          I found solution ...

           

          IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)pWorkspace;

          IExtension featureTab = m_application.FindExtensionByName("FeatureTopLevel");

           

          MMFeatureTopLevel m_featTopLvl = featureTab as MMFeatureTopLevel;

           

          IContentsView contview = mxDoc.get_ContentsView(4);  //4 - Feature Tab v TOC

          IMMFeatureTab featTab = contview as IMMFeatureTab;

           

          ID8List list = featTab.FeaturesList; m_featTopLvl as ID8List;

          list.Reset();

          ID8ListItem m_pSelectionItem = list.Next();             

           

          while (m_pSelectionItem != null)

          {

          }