Cancel
Showing results for 
Search instead for 
Did you mean: 

Select all CAM-features

Creator
Creator

Hello everyone,

 

I wrote a journal to select all CAM-features:

using NXOpen;
using System;

public class NXJournal
{
    public static void Main(string[] args)
    {
        NXOpen.Session theSession = NXOpen.Session.GetSession();
        NXOpen.Part workPart = theSession.Parts.Work;
        NXOpen.UI theUI;
        theUI = UI.GetUI();

        NXOpen.ListingWindow lw;
        lw = theSession.ListingWindow;
        lw.CloseWindow();
        lw.Open();

        int i = 0;
        foreach (NXOpen.CAM.CAMFeature theCamFeature in workPart.CAMFeatures)
        {
            i = i + 1;
        }

        TaggedObject[] theTaggedObject = new TaggedObject[i];
        i = 0;
        foreach (NXOpen.CAM.CAMFeature theCamFeature in workPart.CAMFeatures)
        {
            theTaggedObject[i] = theCamFeature;

            i = i + 1;
        }

        theUI.SelectionManager.ClearGlobalSelectionList();
        theUI.SelectionManager.RequestSelections(theTaggedObject);
    }
}

 

Does anyone know, why this journal selects the features in the part, but not in the feature-navigator?

 

image.png